How to Fix the 500-Internal Server Error in WordPress?

So you have been receiving 500 Internal Server Error in your WordPress website? Don’t panic, have patience and follow our article. The 500 Internal server error is not WordPress specific and it can happen with any other website you host with any web server. There are number of reasons why this error can occur. Its generic nature makes it annoying to fix. It won't show the actual error in browser so you can get it fixed.

To send the actual errors to browsers for Windows based servers, you will have to login to Web server and browse the WordPress website from the server itself. To check actual errors in Linux based servers, you will have to dig the server logs for exact cause of 500 error. We have compiled all possible causes of the 500 Internal Server errors in WordPress along with  troubleshooting steps:

500 Internal Server Error in WordPress



Cause 1 :: Corrupt .htaccess File

If your .htaccess file is corrupt and it can cause a 500 Internal server error. In this case, first you will have to access .htaccess file either through FTP or through cPanel file manager and rename it. Here are the steps you can refer to rename the .htaccess file.

  1. After login at cPanel, under Files section, select the File Manager icon.
  2. Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
  3. Make sure "Show Hidden Files (dotfiles)" is checked and Click on Go.
  4. In a new tab, File Manager will open. Locate .htaccess file in the list of all files.
  5. Right click on the .htaccess file and Rename it like .htaccess.older.

Create new .htaccess

  1. Log into WordPress dashboard.
  2. From the left-hand navigation menu, Click on Settings > Permalinks
  3. Click the Save Settings button and try reloading your website.
If renaming .htaccess file does not resolve your problem, continue reading this article.

Cause 2 :: Memory Exhausted

This error also occurs if your WordPress website exhausts the memory limit. It could be a poorly coded plugins or a theme that is exhausting your memory limit. To fix this, you will have to increase the memory limit in WordPress. Open wp-config.php file located under the root WordPress directory. Add following line in wp-config.php and save the file. 
 
define('WP_MEMORY_LIMIT', '128M');
If you still get this error after this fix, you will have to extend the PHP Memory limit from php.ini file. You can contact your web host to increase the PHP Memory limit.

Cause 3 :: Culprit plugins

If the PHP memory limit increase does not fix your 500 Internal Server error, it is more likely being caused by a one or more plugins installed on WordPress. It is quite often that when new plugin is installed, a previously installed plugins are not comfortable with it which is resulting in a 500 Internal Server error. In other cases, a combination of certain plugins or themes are not compatible with each other and hence ending in 500 error.

Unfortunately, there is no straight way we can determine the exact problematic plugin. Hence, to filter down plugin specific issues you will have to deactivate all WordPress plugins at once. Refer the following steps to deactivate all WordPress plugins without WordPress dashboard.

Deactivate all plugins through cPanel

  1. Login at cPanel, Under Files section, Go to File Manager.
  2. Select Web Root (public_html/www) and click Go.
  3. Expand the public_html folder, and navigate to the /wp-content/plugins folder.
  4. Right click on the /wp-content/plugins folder and rename it like plugins.old. This will deactivate all of the plugins at once.
  5. Now, reactivate plugins folder again by renaming back to plugins. This will allow you to access to the WordPress Dashboard again.
  6. At WordPress Dashboard, reactivate each plugin (one at a time) and reload  your website to see if the 500 error is fixed.

Deactivate all plugins through phpMyAdmin

  1. Login to phpMyAdmin and locate table wp_options, under the option_name column (field) find the active_plugins row
  2. Change the option_value field to: a:0:{}
By this method, you can determine the offending plugin and isolate it to resolve the 500 Internal Server Error.

Re-uploading Core Files

If disabling plugin do not fix the internal server error, then only option you are left with is to re-uploading the wp-admin and wp-includes folder from a fresh WordPress install. Download Fresh WordPress installation and locate and wp-admin and wp-includes folders and replace them at web server. Do not worry, it won't remove any of your WordPress data but it will fix any file corruption issues.

Contact your Web Host to check server logs

In case no solution works for you, you should contact your web host. Web hosts can check the web server error logs and determine exact cause of 500 error. Have you faced the 500 internal server error? Let us know how did you fix it at support@accuwebhosting.com.


  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to install theme in WordPress Website

What is a Theme and why we need it? Themes allow users to change the look and functionality of a...

How to Fix White Screen of Death Error in WordPress?

Everyone who is involved in WordPress development must have faced this annoying white page...

How To Fix An Error "The Uploaded file could not be moved to WP-Content/Uploads" folder?

Sometimes you receive following error while trying to upload new Media/Images to your WordsPress...

How to Change Password of Your User Account in WordPress Blog?

How to change your password in WordPress This tutorial assumes you've already logged in to...

How to Disable WordPress Pingback to Prevent Pingback Brute Force and DDoS Attacks?

WordPress has become the most popular CMS and it continuously increases its market share. On the...