How To Fix 500 Internal Server Error on WordPress
access_time
hourglass_empty
person_outline

How To Fix 500 Internal Server Error on WordPress

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!

What Causes the 500 Internal Server Error?

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.

Fixing 500 Internal Server Error WordPress

Here are nine different causes and solutions to fix WordPress 500 Internal Server Error:

1. WordPress 500 Internal Server Error Due to Bad Plugins

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:

  1. Login to Hostinger hPanel and navigate to File Manager under the Files area.
  2. Head to the wp-content directory on the left navigation menu, then find the Plugins folder and locate the bad plugin. Right-click to Rename.
  3. Rename its directory by adding disabled_ after the plugin name to turn it off. disabling a plugin from file manager
  4. Refresh your website to see if it works.

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.

2. WordPress 500 Internal Server Error Due to Themes Installation

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:

  1. Navigate to phpMyAdmin in the hPanel.
  2. Once you open it, head to the wp_options table.
  3. Locate the template and stylesheet rows.
  4. Click Edit and change the template and stylesheet value with a default theme like twentysixteen, press Go to save changes.

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.

3. WordPress 500 Internal Server Error Due to Corrupted .htaccess File

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:

  1. Open the File Manager and look for .htaccess in the public_html folder, then disable the file by giving it a different name.Disabling .htaccess file by renaming it
  2. Once it’s disabled, go on the upper part of the page and create a new .htaccess file.
  3. Right-click on the new file and select Edit.
  4. Copy-paste the default WordPress .htaccess code in the new one.The default WordPress code in the .htaccess file
  5. Click Save and that’s it! You now have a brand new .htaccess file.

4. Insufficient PHP Limit

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.

5. Incompatible PHP Version

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.

Changing php versions via php configurations on hPanel

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.

6. Enabling Error Display

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.

7. Using WordPress Debugging

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.

8. Restoring a Backup of Your Site

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:

  1. Install and activate the plugin from the Plugin section.
  2. Go to the Backup tab on the sidebar.
  3. Choose Create Backup to export your files. Once the process is done, Download the exported files.Creating a backup using the all-in-one WP migration plugin
  4. Now, to restore a backup, you will need to delete your current website and install a new WordPress site and the All-in-One WP Migration plugin.
  5. Then, select the Import feature, and upload the backup stored on your computer and proceed with the restoration.importing files to the all-in-one wp migration plugin
  6. That’s it! Keep in mind that if your site needs more than a 512MB import size, you can upgrade and get unlimited upload and backup sizes by purchasing the plugin’s premium plan for $69.

9. Re-uploading Core WordPress Files

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:

  1. Download the latest version of WordPress and unzip it on your computer.
  2. Go to the unzipped files and delete the wp-config-sample.php file and the wp-content folder to avoid overwriting any important data.
  3. Configure FileZilla and move all the WordPress core files to your site’s location and overwrite the existing ones.
  4. Once a confirmation screen pops out, check the Always use this action and Apply to current queue only columns. That way, you won’t need to confirm the overwriting process for each file.
  5. That’s it! You just have to wait for the process to finish.

Note: make sure that you already have a backup of your current website in case anything goes wrong.

Conclusion

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:

  • Disabling a corrupted plugin through the WordPress Dashboard or File Manager.
  • Changing the WordPress theme to the default one through phpMyAdmin.
  • Increasing the PHP limit value via the .htaccess file.
  • Changing the PHP version to the latest one with the PHP Configurations tool on the hPanel.
  • Enabling the error display through the PHP Options.
  • Using the WordPress Debug.
  • Restoring a Backup of your site manually or with a plugin.
  • Re-uploading Core WordPress files.

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!

The Author

Author

Gediminas B. / @gedziuzzz

Gediminas was a passionate content writer and SEO geek at Hostinger. He started his journey at customer support and aims to use his gathered knowledge to create the most epic content the world has ever seen. From WordPress to server management, there's no topic he can't cover! He also likes cats.

Related tutorials

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in WordPress
How to Fix Briefly Unavailable for Scheduled Maintenance WordPress Error
How to Fix Briefly Unavailable for Scheduled Maintenance WordPress Error

Close