Fix WordPress 500 Internal Server Error

Are you getting the WordPress 500 Internal Server Error on your website? The WordPress 500 Internal Server Error is shown when the server of file system isn’t working properly. Most common is that there is a problem in the root directory where you installed WordPress. If the problem isn’t coming from the root directory, it most likely comes from your server.

The WordPress 500 Internal Server Error is one of the most common problem that can be a bit frustrating to solve when using WordPress, there is never a clear solution and it requires quite some troubleshooting to find out what is causing it.

Below we are going to show you a few different solutions and hopefully one of them can help you.


Backup your website 

We are going to make a lot of changes in the root directory of your website, so we highly recommend to make a backup of your WordPress website in case something doesn’t go as expected.


Backup with an FTP Client

If you have experience using an FTP client, you can skip this part. I will show you how to install and configure an FTP client for users who have never used it before since most solutions that will be provided in this guide requires you to edit and access your site’s files. Most hosts does provide a file manager with a in-built editor which you could also use but most of the times I feel it’s easier to use an FTP Client.


There are lots of FTP clients to pick from but in this guide we are going to use one of the most common ones, FileZilla. Start by going to FileZilla’s homepage and download FileZilla Client. Once downloaded and installed, click File -> Site Manager and then click on “new site”. Here you will need to enter the correct FTP server settings. Most common ones required is below but sometimes your host may have different settings:

Host = Domain name or server IP.

Port = Leave blank for default port 22 which is used by most hosts.

Protocol = FTP – File Transer Protocol

Encryption = Only use plain FTP

Logon Type = Normal

Most likely you can connect to the FTP with your username and password that you use to login to the file manager at your host. If you can’t you need to create a new FTP account at them. Most hosts have guides for this or you should contact them if you don’t know how to do it.

Once connected we want to speed things up, go to settings and at the “transfer settings” tab, select the checkbox for Limit Number of Simultaneous Connections” and set the Max Connections to 8. Don’t make more than 8 connections at once as this is what most hosts allows or you might get locked out.

Now connect to the server and you are ready to go.

Download the whole WP directory, or at least wp-content and the root files.


WordPress 500 Internal Server Error Solutions

Most common reason for WordPress to throw the WordPress 500 Internal Server Error are a corrupted .htaccess file or the server PHP memory limit is maxed. Corrupted .htaccess files are mostly the main reason for the WordPress 500 Internal Server Error and it’s common they get corrupted after installing a plugin or making big changes to your WordPress website. Finding out if .htaccess is the problem is easy, all you need to do is create a new .htaccess file. We will explain how to do it a bit down in this tutorial.

The second common issue for the WordPress 500 Internal Server Error is that the PHP memory limit is maxed out. This often occur if you installed a poorly-coded plugin or you might just be using to many plugins which your server can’t handle. Let’s continue and I will show you to the create a new .htaccess file to solve the WordPress 500 Internal Server Error as well as check if it’s caused by plugins or not.


Create a new default .htaccess file

First, we are going to open the root directory of your website. You can do this either by using FileZilla or any FTP client of your choice or using the File Manager provided by your host. The root directory is usually called public_html. In the root directory, the folders wp-admin and wp-content should be, if they aren’t there, you are in the wrong place. Here you should also be able to see the .htaccess file. If you can’t you must click “Server” and select “Force Showing Hidden Files”.

new-htaccess-file WordPress 500 Internal Server Error

Once you find the .htaccess file, rename it to .htaccess.bak. Once done, the website has no .htaccess file to listen to so we must now create a new one. Easiest way to do this is to either go into “Settings” in your WP dashboard, then go to permalinks and just hit “Save”, there is no need to change any settings, just hit “Save”. Second option is to create a new .htaccess manually in the root and paste the following code into it:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Now open up your website and check if the WordPress 500 Internal Server Error is gone. If it was caused by a corrupted .htaccess file the error should now be gone and the website issue is fixed. If you however yet see the error there are some other things to check, let’s continue.


Increase the PHP Memory Limit

Limitations in PHP Memory usage can also create troubles with your WordPress website. PHP limits are set by your host and WordPress. WordPress will only us as much memory as your host allows you to use, once it’s maxed out the website won’t load. Let’s try increase the memory limit in WordPress first and see if that solves it.

WordPress 500 Internal Server Error

First open the root directory of your website either with FTP or file manager. Locate the wp-config.php file and open it up for editing. Add the following line just below the opening php tag:

define('WP_MEMORY_LIMIT', '64M');

Now save the file and upload it to your root directory. Now try to load the website in your browser and see if it loads up, if it still doesn’t work you most likely doesn’t have a problem with the php memory limit. Remove the code from the wp-config.php file again and save it.

Even if you can load the website after adding the above code, that’s not a solution, sooner or later you will see the same error again as something is causing the PHP to be maxed out, so let’s continue debugging to find out what’s actually exhausting your limit.


Other common solutions to fix the WordPress 500 Internal Server Error.

The most common solution are for a fact corrupted .htaccess file or php limit issues. However there are some more things u can try, some might solve the php exhausting as explained below as well.


Deactivating Plugins

If you can access the WP dashboard we suggest you to login and deactivate one plugin at a time and after deactivating, try refresh your website and see if it loads. If it does, the error was most likely to be caused by the last deactivated plugin.

Deactivating Plugins

Activate all deactivated plugins except the one you believe is the one causing the error, once done try load the site again, if it loads, delete the plugin with the problem. If the functionality of that plugin is very important we suggest to find a similar plugin or contact the developer directly to see if they can solve it.


If you can’t access the WP dashboard, load up the root directory in your FTP or file manager, open wp-content which contains the plugin folder.

debugg wp plugins

Rename the plugins folder to something like “pluginsbackup”. This will automatically deactivate all plugins. Now refresh your website and see if the error is still there or not. If it’s gone, one of the plugins are causing the error to be thrown. Now rename the folder to “plugins” again and enter the folder. Now rename one plugin at a time and reload the site after each plugin is deactivated to find out which plugin is causing the problem.


Debugg WordPress for errors.

Debugg WordPress

WordPress do have a built-in debugger that’s quite simple to use. All you have to get it started is to paste the following code into the wp-config.php file of your website:

define( 'WP_DEBUG', true );

Any errors found will be recorded in a “error” file in your root directory. If you are a developer you might know what to look for, and what to ignore as all errors shouldn’t be taken seriously. If your just an average site owner, we suggest you to contact a developer to help you out.


File and Folder permission

It’s not common at all that the file or folder permissions are wrong, it might be if you just moved your website from one host to another but it could be for any other reason as well. For WordPress, folders and files should be 755 or 644. Setting permissions to any other permission may cause errors like the WordPress 500 Internal Server Error.

file and folder permissions

To change or check permissions, open your root folder with any FTP client like FileZilla, most FTP clients supports changing permissions. With FileZilla we right-click the file we want to change permissions of and select “File Permissions”.

FileZilla Permissions

Replace old wp-admin and wp-includes to solve the WordPress 500 Internal Server Error.


This solution is the last one we would suggest as it’s one of the most uncommon solution but it have solved the issue for some users. First backup your website if you haven’t done it already.

Now download a fresh version of WordPress from WordPress own website. Now grab the wp-admin and wp-includes from the file downloaded and upload it to your site root directory with an FTP client or via the File Manager provided by your host. If you are asked to overwrite the existing files, select “yes”. Once finished, refresh your website and see if the error is gone, if it is, the error was probably caused by a corrupt file.


Running CloudFlare and changed from HTTP to HTTPS?

This one is not so common but some people get’s the WordPress 500 Internal Server Error after changing from HTTP to HTTPS. This can be caused by lots of things but we found out is might be because you disabled SSL support in cloudflare.

Cloudflare HTTPS WordPress issue

In CloudFlare, go to “Crypto” and select “Flexible” or “Full”, if you only use HTTPS on your website we suggest you to use “Full” option.


Now reload your website and see if the error is gone.


Contact your hosting provider.

If you still, after going through all solutions in this guide we suggest you to contact your host to see if they can help you. Some hosting providers might be able to help you out for free, some may charge you, it all depends on what host you are on and what you are paying for.


Final Thoughts

This is one of the most frustrating errors you can have running WordPress as it’s very complicated to find out what’s causing it as it never has any clear solution. You may need to put a lot of time into debugging and it might be quite frustrating before you find the main cause for the error.

In the future, be sure to update you theme, plugins and WordPress as soon as there are updates available. You can always ask your theme developer when they do updates to their theme if your plugins are compatible with the theme or not to prevent any corrupt .htaccess file.

Also, always make sure you are on a hosting plan that can handle your website and traffic so it’s not thrown because your resourced are maxed.

Let us know in the comments below if your issue is solved or maybe you know any other solution we can add to this guide?

User Review
4 (1 vote)

Leave a Reply