I am receiving a “500 Internal Server Error” on my WordPress site

Internal server errors are not specific to WordPress, and it can happen with anything else running on your server as well. Due to the generic nature of this error, it doesn’t tell you anything. Having said that, an internal server error is usually caused by a plugin’s and/or theme’s function. Other possible causes of an internal server error are corrupted .htaccess or .wp-config file and an exceeded PHP memory limit. Sometimes an internal server error only shows up when you are trying to access the Dashboard while the rest of the site works fine.

In this article we will look at how to troubleshoot an internal server error in your WordPress installation.

Checking for corrupt .htaccess file

The first thing you should do when troubleshooting the internal server error in WordPress is check for a corrupted .htaccess file. You can do so by renaming your main .htaccess file to something like .htaccess_old. To rename your .htaccess file, you will need to login to your site via FTP. Your .htaccess file will be located in the root directory alongside your wp-content, wp-admin, and wp-includes folders.

Once you have renamed the .htaccess file, try loading your site to see if this solved the problem. If it did make sure that you go to Settings > Permalinks and click the save button. This will generate a new .htaccess file for you with proper rewrite rules to ensure that your post pages do not return any 404 errors.

If checking for the corrupt .htaccess file solution did not work for you, then you need to continue reading this article.

Increasing the PHP memory limit

Sometimes this error can happen if you are exhausting your PHP memory limit. Use our tutorial on how to increase PHP memory limit in WordPress to fix that.

If you are seeing the internal server error only when you try to login to your WordPress admin or uploading an image in your wp-admin, then you should increase the memory limit by following these steps:

  1. Create a blank text file called php.ini
  2. Paste this code in there: memory=64MB
  3. Save the file
  4. Upload it into your /wp-admin/ folder using FTP

If increasing the PHP memory limit fixed your site’s error be aware that this has only temporarily fixed the problem. The reason is because your memory limit is probably being exhausted by a poorly coded plugin or theme. It is advised that you ask your WordPress web hosting company to look into your sites server logs to help you find the exact reason.

If increasing the PHP memory limit did not fix the issue for you, then keep reading.

Deactivate all plugins

If none of the above solutions worked for you, then this error is most likely being caused by a specific plugin. It is also possible that it is a combination of plugins that are not playing nice with each other. Sadly, there is no easy way to find this out. You have to deactivate all WordPress plugins at once.

To deactivate all your plugins follow these steps:

  1. Connect to your site via FTP
  2. Navigate to your wp-content folder and rename the plugin folder to something like plugins_deactivated

Once you have do that all your plugins will be deactivated. Try reloading your site and see if that fixed the problem.  

If disabling all plugins fixed the error, then you know it is one of the plugins that is causing the error. Simply go through and reactivate one plugin at a time until you find the one that caused the issue. Get rid of that plugin, and report the error to the plugin author.

Re-uploading core files

If the plugin option didn’t fix the internal server error, then it is worth re-uploading the wp-admin and wp-includes folder from a fresh WordPress install. This will NOT remove any of your information, but it may solve the problem in case any file was corrupted.

Ask us for help

If none of the above works, then open a support ticket from your HostPapa dashboard and we’d be happy to help get to the bottom of the issue.

Was this article helpful?

Related Articles

Leave A Comment?