How To Easily Fix 500 Internal Server Error in WordPress
500 Internal Server Error is one of the most troublesome errors one can see on any website because these errors won’t provide much information to resolve them easily. In WordPress based website also we will see this kind of errors without detailed information why this 500 Internal Server Error occurred. But don’t worry, I’ll take you through a couple of simple steps to solve this problem in WordPress.
First of all, before going to the next steps, you should take backup of your WordPress website. If you have earlier backups, you can restore your website with those backups and you can work on fixing the issue with your new backup.
You can use these plugins to take backup of your WordPress website.
Follow these steps to fix 500 Internal Server Error in WordPress website, go through these steps one by one.
1. Problem with htaccess file
The first common problem for 500 Internal Server Error is the htaccess file. In WordPress, it is easy to fix this htaccess issue.
Login to your hosting server with cPanel or FTP using FileZilla. You will see the .htaccess file in the root directory of WordPress installation, most probably this will be under public_html. If you are not able to see this file enable the hidden files from the settings. Rename the file to a different name other than .htaccess like .htaccess_bak. If you are able to access your website without any 500 Internal Server error, then you have fixed the issue.
Next, you have to create the .htaccess for the WordPress URLs to work. You don’t have to create this file manually by typing all the code. You can create this file with a click of the button.
Login into WordPress admin area, Navigate to Settings => Permalinks click on the save button on this page. This should create the new .htaccess file, and all the URL’s should work as normal.
2. Due to Insufficient PHP Memory Limit
500 Internal Server Error in WordPress can sometimes happen Due to Insufficient PHP Memory Limit. You can Fix Memory Size Exhausted Error in WordPress with this detailed tutorial.
You can find out the Internal Server Error is causing because of PHP Memory Limit. You will get this Internal Server Error while performing some actions on your WordPress website.
You can increase the PHP Memory Limit from cPanel and also from WordPress, follow any one of these.
From cPanel, Login to cPanel and open File Manager.
Create a new file with php.ini in the root directory or in public_html directory and add this code memory=64MB, save the file.
From WordPress, open the wp-config.php file and add this line of code
By adding the above internal server error may be solved, but still, you have to find out the culprit using most of the memory. You can fix this issue by following this guide How to Fix Memory Size Exhausted Error in WordPress
3. Caused by a WordPress Plugin
Sometimes Internal Server Error may be caused by any one of the WordPress Plugins installed on your website. You can check it out simply by renaming the plugins directory to any name like “plugins-deactivated”.
After making the above changes if you can access the website without internal server error, one of the plugins is causing the issue.
Try checking enabling/disabling the plugins one by one, so that you can find the plugins which are causing the issue. Most probably outdated plugins will cause these issues.
4. Dubugging WordPress Installation
You can enable debugging in WordPress to log the errors to debug.log file under the wp-content directory.
To enable debugging in WordPress, open wp-config.php file and add these lines of code.
define (‘WP_DEBUG’, true);
define (‘WP_DEBUG_LOG’, true);
define (‘WP_DEBUG_DISPLAY’. false);
@ini_set (‘display_errors’, 0);
After adding the code, reload the page which is causing the internal server error. Now if you check wp-content directory, you should see the debug.log file.
5. Check File Permissions
After following the above steps if you are not able to solve the Internal Server Error issue, check the permissions of folder and files. The permissions for Folders & Files should be 755 or 644, anything other than this may cause the issue. Change the permissions to these numbers with FTP programs like Filezilla of cPanel.
6. Maybe Corrupted WordPress Core Files
If your problems haven’t been solved with the above steps, the final step to check is maybe Corrupted WordPress Core Files.
Download the fresh copy of WordPress ZIP archive from the WordPress website. Extract these files and upload wp-admin, wp-includes folders on to the server.
Now reload the website, by now your issue should be resolved.
Leave a Reply