Fix WordPress HTTP 500 internal server error in simple steps

WordPress is no exception when it comes to bugs. It can range from your WordPress web hosting to bugs in your theme or plugins. Some bugs can be fixed with a tweak or two, while others can take days of troubleshooting to fix. All of this can result in a loss of traffic and potentially degrade a website’s user experience.

Let’s say your website is working fine until a few days ago, a small bug pops up and escapes you. Suddenly you notice an internal error of 500 on every page of your website. Don’t worry! I know you’re panicking now that you’ve just encountered a 500 internal server error on your WordPress site, but there’s a fix for almost everything on WordPress. It is due to the nature and variety of the CMS itself that you can find a solution for everything.

Today I’m going to tell you how to fix WordPress 500 internal server error so that in the future you don’t have to face this problem and even if you do, you have a ready-made solution at hand.

As the name suggests, this occurs at the server level when the server is unable to display the requested page. An internal server error is an application-side problem that can occur on your web server. When you type a specific URL into the address bar or click a link on a website, you are asking the server to show you a page. Currently the server cannot show you the page you are looking for for some reason, which means there is an internal server error.

Notice: To be on the safe side, always remember that your hosting provider must offer you an automated backup.

Tired of fixing WordPress errors?

Try Cloudways Managed Hosting for a hassle-free experience.

Try now!

2. Create a WordPress backup

Most of the time, you are not responsible for any errors that occur on your hosted server. Since humans can make mistakes, servers can make mistakes too, since they are only managed by humans. Some of these errors are serious and can affect your entire website. Therefore, backing up website data on your server should be a mandatory practice.

However, if your hosting provider doesn’t give you the right options for backing up WordPress website data, you can try the following WordPress backup plugins.

3. How to fix internal server error 500 on your WordPress website

Fixing errors can save a lot of time and effort. An initial analysis of the problem can help you identify the cause. pave the way for solving the problem at hand. Many reasons can cause the server to throw internal server error 500 on WordPress website.

In order to fix this persistent problem, it is necessary to identify the cause of the occurrence. The two most common causes of this error are a corrupted .htaccess file and the PHP memory limit. So, without further ado, let’s discuss how to fix them.

3.1 Error correction of .htaccess file

One of the key files in any PHP-based application is the .htaccess file. This file contains server-related configuration rules. If your .htaccess file is corrupted, it can result in an internal 500 server error. The .htaccess file is usually affected by a module or incorrect installation of a theme. In this case, you should first access your .htaccess file. Login to your FTP account to diagnose this issue. Once you’ve logged into your FTP account, you’ll see a .htaccess file in the root directory along with other folders like wp-content, wp-include, and wp-admin.

After finding your .htaccess file, you can download it from the live server to a local location on your PC. Next, open this file in your text editor (Notepad++, Dreamweaver, etc.).

Navigate to this link: and copy the version of the code that best suits your site. Then save the .htaccess file and upload it to the live server.

The code differs for different WordPress configurations and installations. Assuming you used WordPress Multisite in WordPress 3.5 or higher, then you need to use the following code:

 RewriteEngine Ein
RewriteBase /
RewriteRule ^index.php$ - [L]
# einen nachgestellten Schrägstrich zu /wp-admin hinzufügen
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]

Now reload your website to see if internal server error 500 is fixed. If it’s fixed that would be great, but if not then navigate to the next step.

Why speed is crucial for SEO & UX?

These expert tips will show you how to improve the speed of your WordPress websites.

Thanks very much

Your e-book is on its way to your inbox.

3.2 PHP memory limit increase in WordPress

When a user makes a request, PHP handles it, triggering a process that ultimately renders the HTML on the client side. PHP memory is allocated to run this process. Another way to fix internal server error 500 is to increase PHP memory limit. Your host and WordPress set the PHP memory limits by default. As soon as you observe a memory drop, the server automatically displays a 500 internal server error. To avoid such discrepancies, simply increase the PHP memory limit in WordPress and check whether your website is working fine or not. This way you can seemingly avoid the 500 internal server errors appearing frequently on your website.

One of the most common ways to increase a WordPress website’s PHP memory limits is to change the code in one of these files:

  • Functions.php file
  • .htaccess file
  • PHP.ini file
  • wp-Config.php file

So you can optimize these files and

function file

Navigate to your root directory and locate the function.php file. Right-click this file and select Download. It will download the file to your PC. Open the file in your text editor and paste this code under the opening PHP tag:

 @ini_set('upload_max_size' , '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');

.htaccess file

You can also use a .htaccess file to increase PHP memory limit. Just go to your root directory and locate the .htaccess file. Right-click the file and select Download to download it to your PC. Now open the file in your text editor and paste this code under the opening PHP tag:

 php_value upload_max_filesize 64M
php_value post_max_size 64M

WP configuration file

You can also use a wp-config.php file to increase PHP memory limit. Just go to your root directory and locate the wp-config.php file. Right-click the file and select Download to download it to your PC. Open the file in your text editor and paste this code under the opening PHP tag:

 define('WP_MEMORY_LIMIT', '64M');
ini_set('post_max_size', '64M');
ini_set('upload_max_filesize', '64M');

PHP.ini file

You need to create a php.ini file and put the following code in it. Upload the following code to the wp-admin/ directory.

 memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
file_uploads = Ein

If these two ways are not enough to fix the 500 Internal Server Error, here are other ways you can avoid this server error on your WordPress website.

3.3 Plugin Audit

Faulty or outdated plugins can cause compatibility issues that lead to errors on the WordPress website. They are considered a security risk because they have not been updated with the latest WordPress security patches.

If you have access to your WordPress website admin dashboard, disable each plugin one at a time. Refresh your website after each deactivation.

Then check your site again. If the site is working properly, the internal server error must be due to the plugin installed on your WordPress. Now you have to activate each plugin individually and refresh your website after each plugin activation. The problematic plugin will soon be identified as it results in a 500 Internal Server error for your website.

You can either remove this plugin and replace it with an updated plugin or contact the support team to release the patch so it can be used.

Ideally, the problem is solved at this point. If not, continue with the following step.

Fresh wp-admin & wp-inclusive

Sometimes fixing a bug is harder than expected. A typical WordPress site is made up of third-party themes and plugins, and auditing their source code is no small feat. In this section you need to download new wp-admin and wp-content folders and upload them to the live host via FTP. Before this step, make sure you have backed up the website.

Contact your hosting provider

If the problem persists even after investigating these common causes, you should contact your hosting provider. You can send a request to the technical experts to solve your problem by going through your server settings.

One can find several error messages related to the 500 Internal Server Error message as they are all server-side errors. One such example of a 500 error is the 502 Bad Gateway Error. If you are a Cloudways user and need to face these above errors then you need to contact our WordPress cloud hosting support team. They will help you solve these problems. If you want to learn more about how to fix 502 Bad Gateway Error in detail, click here.

Final Thoughts

We hope you found this guide useful and solved your WordPress 500 internal server error issue. Have you found another way to get rid of this problem? Please share your solutions with us in the provided comment section below. I’m sure it will be beneficial to others facing similar problems.

Meanwhile, you can also learn how to fix 403 Forbidden and 404 Page Not Found error for your WordPress websites.

Q1 What Causes a 500 Error?

Error message 500 (Internal Server Error 500) is often associated with a web server crash problem. This error message does not necessarily mean that the web host is responsible. There are many reasons for such a failure.

The HTTP header information returned by the web server indicates to the client that something is not working normally, without specifying the exact cause of the error.

Q2. What is a 500 error?

A 500 error is an internal server error. This error can be due to a script error or misconfiguration of your web hosting. It’s not necessarily the hosting’s fault, but in any case, this error can be fixed by you.

Previous post WordPress: Internal Server Error – you can do that
WordPress Internal Server Error Next post Troubleshooting: Eliminate WordPress ‘Internal Server Error’ 500