6 Ways to Fix WordPress Internal Server Errors

While HTTP 404 Page Not Found errors are frustrating, HTTP 500 Internal Server errors can be heart sinking, especially if you are the webmaster. If you see such an error on your site, don’t panic. In this post we shall look into ways to eliminate internal server errors in a WordPress site.

The reasons for Internal Server Errors

Like any computer, a server might throw up errors in many situations. So, if your WordPress site shows an internal server error, it doesn’t necessarily mean that it is specific to the WordPress. That’s one of the factors which make it so hard to pin point the source of the HTTP 500 error. As far as WordPress is concerned, most of the times, the error is caused due to problems in plugins or themes. Apart from this, a corrupted .htaccess file and exceeding the PHP memory limit are also some of the common problems culminating into an internal server error. To cure the problem, you have to look into each of the possible sources of error and then proceed to fix them.

Check corrupt .htaccess file

To start with, rename the current .htaccess file as .htaccess_old. Effectively you have deleted the .htaccess file. To do this, you would have to access the root folder of the server through FTP. Find the .htaccess file and rename it suitably. After completing this, load the WordPress site. If there are no errors, you are done! To complete the repairing process go to “Settings” and then to “Permalinks” and click the ‘Save’ button. Doing so will generate a new .htaccess file, and will ensure that your posts don’t throw an 404 error.

However, if this step didn’t solve the problem, it’s time to go to next steps.

Expanding the PHP memory limit

If the PHP memory limit is being exceeded, the site will not function properly. Increasing the PHP limit is in itself a long task, and one can find a detailed account of it in other tutorials.

Another variant of the problem is having the server error only in the admin page, whereas the rest of the site works just fine. To eliminate this type of problem, you can follow these steps:

  • Make a blank text file, and name it php.ini
  • Write memory=64 MB in it
  • Upload it in the /wp-admin/ folder using FTP.

If doing any of the above steps really fixes the problem, in actuality you have solved only a part of the problem. If the memory is exceeding then there must be some badly written code running on the server, or a newly installed plugin might be sucking up the memory.

If this step didn’t help you fix the internal server error, the next stop would be troubleshooting the plugins.

Deactivating the Plugins

Many a time a problem in the site is caused by a newly installed plugin. To pin point which plugin is the culprit, deactivate all of them. Then start reactivating each of the plugins and check if the site is still working. If you are lucky you will narrow down the problem soon.

If deactivating the plugins doesn’t help at all, then the problem might be with the core files.

Changing the core files

The wp-admin and wp-includes are the folders that contain the core installation files. Deleting the existing ones and re-uploading fresh files from a new installation helps the problem in most situations. This will not change any of your information (as all the content is stored in wp-content folder).

The last resort- Contact your hosting provider

If none of the above problems work, then the problem might be on the server side. Contacting the your wordpress hosting providers is the only option that is left.

Hopefully at the end of all these, you would find a way to actually fix the internal server problem at your WordPress site.