Fix Internal Server Error 500
This article will help you fix internal server error 500. The internal Server error message is a generic server error. Every error returns a status code and 500 is the status code for internal server error. It does not give a clear clue to what actually has happened and why has it happened. This is a generic HTTP error code and has multiple causes. In this article, we will discuss all the causes that lead 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 internal server error status code 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
htaccess is a configuration file for Apache Web Servers. It is used for changing the configuration of the webserver or enabling and/or disabling certain features. 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 permalink and click on “Save” without changing anything.
You should not make any changes to the permalink. Just click on save. This 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 be having a numeric value in “value” argument. Increase this limit to say 256 etc. This 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
If you have recently installed a Plugin or updated it. Disable this Plugin. If you are not sure about which Plugin or Plugin update has created the problem. Read this article to know how to find out the culprit Plugin.
Problem with theme
The internal server error 500 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 internal server error 500. In this case, you will have to re-upload fresh WordPress core files. You will need to only upload the wp-admin and wp-includes folders. First, visit wordpress.org and download the WordPress core files.
This will download 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. This will not erase any of your information but will just install new core files.
The above fixes are the best fixes for internal server error 500. You will need to contact your hosting provider if these fixes did not work for you. This problem is then at the hosting end. They will tell you the cause of error after checking the server logs.
This was all about how to fix the internal server error status code 500 on WordPress. If you have any question related to the topic or 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.