fix 500 internal server error in WordPress
Are you facing 500 internal server error in WordPress website?
WordPress is a wonderful and most popular Content Management Software but sometimes even it can give error too. WordPress users experience 500 internal server error more frequently in comparison to other errors. It is the most frustrating error that requires a lot of time and attention. It doesn’t specify the root of the problem. So, you will have to go through a lot of troubleshooting in order to fix it.
Here, we are going to learn complete solution on how to fix the 500 internal server error in WordPress.
Backup your WordPress Website
First thing comes first. Before we begin, backup your Website. In case something goes wrong while trying to fix 500 internal server error, you can retrieve website from recent backup. So, it’s a good practice to backup before making any change.
What Causes the 500 Internal Server Error in WordPress?
The 500 internal server error is a generic message that appears when there is an error but the server can not identify the exact error. It happens most of the time because of the poorly coded plugin or theme functions, corrupt .htaccess file, and PHP memory limit.
Now, follow the complete solution described below to fix the 500 internal server error in WordPress step by step.
Turn on Debugging in WordPress
You can turn on the WordPress debugging to specifically tell which plugin or theme caused the error on the screen rather than displaying 500 internal server error in WordPress.
- Login to your site using FTP client.
- Go to the root directory and locate the wp-config.php file.
- Use FTP to edit wp-config.php.
- Search for WP-DEBUG within it.
- Now, set it to “true”.
define( ‘WP_DEBUG’, ‘TRUE’)
Now, check if the server error is replaced by another message that specifically tells you about the actual WordPress error. Continue reading to easily fix the 500 internal server error in WordPress dashboard.
Increase Your PHP Memory Limit
Exhausting memory limit can also cause the 500 internal server error in WordPress. You can fix it by increasing your PHP memory limit.
- Login using FTP or FileZilla app into cPanel dashboard of your hosting account.
- Go to the root directory, and locate the wp-config.php file.
- Download it to your computer.
- Open the file in text editor, and copy paste this code right below the opening PHP tag.
define( ‘WP_MEMORY_LIMIT’, ‘64M’ )
- Next, save and re-upload the file back into your server.
If you are still facing the error then continue reading to fix the 500 internal server error in WordPress admin.
Corrupted .htaccess File
This is the simplest and most common method in practice to fix internal server error. The corrupted .htaccess file can also cause the error.
- Login to FTP or FileZilla app in cPanel dashboard of your hosting account.
- Locate the .htaccess file and rename it into any name like “.htaccess.del”.
Now, go back to your site and check whether the error is fixed or not. If the issue is fixed then it indicates the error was caused by the corrupted .htaccess file.
- Next, Go to WordPress admin area>>settings>>permalinks. Click on the save button to create a new .htaccess file.
Continue reading to fix the 500 internal server error fixed if the issue is not fixed.
Deactivate All Plugins
If none of the above-given options fixes the 500 internal server error in WordPress then it means the error is caused due to the poorly coded plugins or themes. It might also occur due to plugins incompatibility with each other. You can deactivate the defective plugin or themes.
- Go to the wp-admin area and deactivate the plugins and theme one by one.
- If you are unable to access the wp-admin area then go to the root directory.
- Open wp-content and locate plugins. Then, rename plugin to any name you prefer. This deactivates all the plugins.
Log in to your site and check if the error is fixed. Activate all the plugins one by one in order to find out which one caused the error. Again, rename it back to ‘plugins’. You can also ask your host for help and suggestions.
To wrap up, you can easily fix the 500 internal server error in WordPress by using the methods described above. Hope you find this article helpful to troubleshoot the 500 internal server error.
If you have any query, please write to us on the comment section below.
You might also like to read the following informative articles.