How to Fix 500 Internal Server Error in WordPress?

This article will help you fix 500 internal server error. The internal server error message is a generic server error. Every error returns a status code, and 500 is the status code for an internal server error. It does not give a clear clue as to what has happened or why it has happened. It is a generic HTTP error code and has multiple causes. In this article, we will discuss all the reasons that led to generating this error. This article has been written keeping WordPress CMS in mind, but you can also apply some of the fixes to websites developed in other CMS.

Causes of “500 Internal Server Error” in WordPress

There are five well-known causes that may lead to an internal server error status code of 500. They are listed below.

  • Corrupt .htaccesss file
  • The memory limit of PHP
  • Corrupt or poorly coded Plugin
  • Problem with theme
  • Corrupt WordPress core files

Corrupt .htaccesss file

This is the first and the most effective method to fix 500 internal server error. The .htaccess is a configuration file for Apache Web servers. It is used for changing the configuration of the web server or enabling and disabling certain features. The .htaccess file offers many functionalities, ranging from simple redirects to password-protecting content. This file is very critical, and a slight change in it can produce a severe effect.

To disable the current corrupt htaccess file and generate a fresh copy, follow the following steps.

  • Login to your Cpanel account
  • Locate your root directory. It is public_html in most of the cases.
  • Right-click on .htaccess and select rename. (This file may be hidden. You will, therefore, need to unhide it first)
  • Give it any name like htacess_old
  • Login to your WordPress admin panel and go to settings. Select the permalink and click on “Save” without changing anything.

You should not make any changes to the permalink. Just click on save. It will generate a new .htaccess file. You can now safely delete the old one. Now visit your site to see whether the error still exists. It might have gone if the error was due to the .htaccess wrong configuration. If it has not gone then continue reading this article to find out other fixes.

The memory limit of PHP

This error may also occur when the PHP memory limit is low. You will also encounter this problem in uploading images or other files if the error is due to this reason, PHP memory limit, edit the wp-config.php file, and find out the following line of code. Define (‘wp_memory_limit’,’ value’). You will have a numeric value in the “value” argument. Increase this limit to say 256 etc. It will hopefully solve the problem. Now visit your site to see whether the problem still exists or it has gone.

Corrupt or poorly coded Plugin

Corrupt or poorly coded plugins may also lead to this problem. In this case, you will need to disable this plugin.

You can fix 500 internal server error by disabling the culprit plugin. If you have recently installed a Plugin or updated it. Disable this Plugin.

Problem with theme

The 500 internal server error can also be caused by a poorly coded theme or theme update. If you have recently changed your theme or have updated the theme, you will need to undo the changes. Deactivate your current theme and leave the default theme to be active. The default WordPress theme these days is twenty-nineteen. If this has removed the error, then the theme or theme update was the reason. You will have to change your theme.

Corrupt WordPress core files

WordPress core files, if corrupt, may also generate 500 internal server error. In this case, you will have to re-upload new WordPress core files. You will need only to upload the wp-admin and wp-includes folders. First, visit wordpress.org and download the WordPress core files.

Fix 500 Internal Server Error

After downloading all the WordPress files, you need to upload only the wp-admin and wp-includes folders to the root of your site, the public_html folder. Overwrite all the files with the new ones. It will not erase any of your information but will install original core files.

The above fixes are the best fixes for internal server error 500. You would need to contact your hosting provider if these fixes do not work for you. This problem is then at the hosting end. They will tell you the cause of the error after checking the server logs.

Conclusion

It was all about how to fix 500 internal server error on WordPress. If you have any questions related to the topic or if our fixes did not work for you. Kindly give your feedback in the comment section. We will try our best to figure out the error and provide you with any help you need.

Engr. Rahamd Ullah
Engr. Rahamd Ullah
Articles: 83
Share This