November 25, 2019
November 25, 2019
Running into the 500 Internal Server Error in WordPress? Well, you’re not alone! 500 Internal Server Error or HTTP Error 500 is one of the most common issues WordPress webmasters encounter.
However, catching the cause behind this error is not as easy as the commonly encountered 404 error, where the possible reasons are broken permalinks or changed page URLs.
Nevertheless, we got you! Here is a quick tutorial on fixing WordPress 500 internal server error using nine different methods. Let’s check it out!
The most common reasons behind the Internal Server Error are corrupted .htaccess files, a new theme and or plugin, incompatible PHP version, or a WordPress update.
One of the best things to do when troubleshooting this error is to trace back your steps. Try remembering what specific event caused your site to stop functioning. When you know exactly what went wrong, scroll down and find the solution from the list below!
IMPORTANT: Before proceeding with this tutorial, we recommend making a backup of your site to prevent any file loss during the changes.
Here are nine different causes and solutions to fix WordPress 500 Internal Server Error:
In most cases, WordPress 500 Internal Server Error occurs because of a new plugin. If your page experienced issues after a new plugin installation or update, then you can easily fix it by deactivating or removing the plugin.
There are two easy ways of doing this: through WordPress dashboard or File Manager.
If your WordPress Dashboard is still accessible, head to Plugins -> Installed Plugins on the left navigation menu. Then, find the problematic plugin and click Deactivate.
If you don’t have access to your dashboard, you can also disable or remove plugins through File Manager in your hosting control panel. Here we’re using Hostinger hPanel as an example:
In case the problem persists, repeat the process until all plugins are deactivated or until your website is working again. Once you find out which plugin caused the error, remove it completely and try to find a substitute that performs the same to be safe.
A new theme or update is also one of the common causes of this error. To fix it, simply change the existing theme to a new one or change it to one of the default options.
If you can access the WordPress admin area, try to change the WordPress theme.
Alternatively, you can also change themes by editing the MySQL database via phpMyAdmin in the control panel. Here’s how to do it with the hPanel:
Now, reload your site with the new theme and see if it fixed the errors!
To see a list of installed themes on your database that can be used to change the existing one, go to the wp-content/themes directory using File Manager.
Another way to get rid of the internal server error is to check your current .htaccess file and make sure that it’s not corrupted. However, you can also just create a completely new one. Here’s what you need to do:
A memory limitation or insufficient PHP value can be another reason behind the WordPress 500 internal server error as scripts and plugins require a certain amount of memory to work.
To fix it, increase the PHP limit by editing the .htaccess file manually. Here are the lines that we recommend adding:
php_value upload_max_filesize 128M php_value post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300 php_value memory_limit 256M
Once done, refresh your website. If the issue is related to insufficient PHP values, this solution will fix it.
Some plugins and scripts require a specific PHP version to work properly. If the requirements are not met, the 500 Internal Server Error may appear.
To change the PHP version via the hPanel, simply log in and head to the PHP configurations under the Advanced tab.
In case you don’t know what PHP version is needed, try upgrading or downgrading. Don’t forget to save the settings and refresh your website after each change.
If it still doesn’t fix the error, change your PHP version to the initial one (which was used at the beginning) and proceed to the next option.
Finding the reason for the WordPress 500 Internal Server Error is arguably the toughest part of fixing it. If none of the options above helped you, you may need to investigate deeper by enabling an error display that allows you to find and locate a specific error on your site.
You can easily do so through the PHP Configuration section on your hosting control panel. Switch to the PHP Options and put a check on the display_errors and log_errors columns, then scroll down and Save. Once you refresh your site, it should display the specific.
Alternatively, you can also create a separate error log file and generate entries through the .htaccess file.
If the step above didn’t work, WordPress has its own special debugging system that you can use to troubleshoot issues. You can use it to generate an error log in the wp_content folder or display the error on your site when you access it. All you need to do is to enable the wp_debug feature.
In case you’ve backed up WordPress when it was functional, restoring the backup is also an option. All you need to do is remove all your recent site files, and re-upload the backup to your site. You can also restore your site with a database backup.
However, if you are not a fan of restoring WordPress backups manually, you can use a plugin. It won’t be much help if your site is not functional, of course, but it can surely help avoid similar issues in the future.
To create and restore a backup through the All-in-One WP Migration plugin, follow these steps:
If nothing seems to go right, there is a more drastic resort to fix this error: replacing all of the core WordPress files. Here’s how:
Note: make sure that you already have a backup of your current website in case anything goes wrong.
Everyone who uses WordPress has encountered the WordPress internal server error at least once in their life. However, whether you’re an advanced developer, or a beginner, fixing the error is pretty easy if you know what to do.
Here’s a quick recap of the methods we’ve learned today:
There you have it! The WordPress 500 Internal Server Error can be scary but if you follow the steps we provided carefully, you’ll be able to access your site again in no time. Good luck!