What is it and how to fix Error 500 (Internal Server Error) in WordPress

Have you encountered the 500 Internal Server Error in WordPress? Well, you’re not the only one. This is one of the most common problems that WordPress website administrators have.

The 500 internal server error either HTTP 500 error is an HTTP status code indicating a general server-side error on the website without giving further details.

Because of this, detecting the cause behind this error is not as easy as the , which is commonly caused by broken permalinks or changed page URLs.

Here is a quick tutorial on how to fix WordPress HTTP 500 error using several different methods. Let’s get to it.

Fix Error 500 in WordPress

Here are 10 different causes and solutions for the 500 Internal Server Error in WordPress:

ImportantNote: Before proceeding with this tutorial, we recommend making a backup of your site to avoid any file loss during changes.

1. 500 error in WordPress due to a bug in a plugin

In most cases, the WordPress HTTP 500 error occurs due to a new plugin. If your page experiences problems after a new installation or update, you can easily fix it by disabling or removing the plugin.

You can do this from the WordPress section of the hPanel or from the File Manager.

In the hPanel, go to WordPress and select plugins.

  1. You should see a list of Installed plugins. There, click on all the green buttons Active and change all plugins to Inactive.
  2. One by one, pass each plugin to Activeor again and test your site after each one.
  3. If your site is fine, keep Active that plugin. If you see the error, you already know which plugin is causing the problem.

If you don’t have access to your control panel, you can also disable or remove plugins via the file manager of your hosting. Here we are using ‘s hPanel as an example:

  1. Login to the hPanel and navigate to the file manager low section Records.
  2. Click on the folder public_html and select the directory wp-content.
  3. open the folder plugins and locate the problem plugin. Then click the right mouse button and then click rename to rename.
  4. Rename your directory and add disabled after the plugin name to disable it
  5. Lastly, update your website to see if it works.

In case the problem persists, repeat the process until all plugins are disabled or until your website works again. Once you figure out which plugin is causing the 500 error, remove it completely and reinstall it or try to find a replacement that performs the same function.

2. Error 500 in WordPress for the installation of a theme

A new theme or update is another common cause of this error. To fix it, simply change the existing theme to a new one or to one of the default options.

See also  How to access the WordPress dashboard

If you can, try from there.

Another option is to change themes by editing the MySQL database via phpMyAdmin on the control panel. Here’s how to do it with the hPanel:

  1. Navigate to phpMyAdmin low section Databases of the hPanel.
  2. Once opened, go to the section wp_options.
  3. Find the rows template Y style sheet.
  4. click on Edit and change the value of template and stylesheet to a default theme like , press Go to save the changes.

Now, reload your site with the new theme and check if the problem is fixed.

To see a list of themes installed in your database that you can use to change the existing one, go to the directory wp-content/themes using the File Manager.

3. Error 500 in WordPress due to a corrupt .htaccess file

Another way to get rid of the 500 error is to check your file .htaccess current and make sure it is not corrupted. But you can also create a completely new one. This is what you should do:

  1. Open the file manager and look for the .htaccess in the folder public_htmlthen deactivate the file by giving it a different name.
  2. Once disabled, go to the top of the page and create a new file .htaccess.
  3. Right-click on the new file and select Edit.
  4. Copy and paste the default code into the new one.
  • click on Save and ready. You already have a new file .htaccess.

4. Insufficient PHP memory limit

A memory limit or insufficient value of PHP can be another reason behind the problem in WordPress, as scripts and plugins require a certain amount of memory to work.

To fix the memory limit, increase the PHP limit by editing the manually. These are the lines 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, update your website. If the problem is related to insufficient PHP values, this solution will fix the error.

5. Incompatible PHP version

Some plugins and scripts require a specific version of PHP to work properly. If the requirements are not met, the 500 (Internal Server Error) error may appear.

To change the PHP version through the hPanel, simply login and go to PHP configuration on the tab Advanced.

In case you don’t know which version of PHP is required, try upgrading or downgrading. Don’t forget to save your settings and update your website after every change.

If it still doesn’t fix the problem, change your PHP version back to the original one (the one used at the beginning) and move on to the next point.

See also  Customer stories: a way to fight deforestation in style

6. Enable error display

Finding the reason for the WordPress 500 error is possibly the hardest part of fixing it. If none of the above options have helped you, you may need to investigate further by enabling display errors to find a specific problem on your site.

You can easily do this through the section PHP configuration in your hosting control panel. go to PHP Options and mark the columns display_errors Y log_errors. Then scroll down and click Save. When you refresh your site, it should display the specific error.

You can also create a separate error log file and generate entries via the file .htaccess.

7. Use WordPress debugging

If the above step didn’t work to fix the error, WordPress has its own special debugging system for troubleshooting. You can use it to generate an error log on the folder wp_content or to show the 500 error on your site when you access it. All you need to do is .

8. Restore a backup of your site

If you have made a WordPress one when it worked, you can restore the site. Just delete all recent files from your site and reload the backup. 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 help much if your site isn’t working, of course, but it can certainly help you avoid similar problems in the future.

To create and restore a backup via the plugin, follow these steps:

  1. Install and activate the plugin from the section plugins.
  2. Then select Backups in the plugin tab.
  3. Choose Create Backup to export your files. When the process is finished, download the exported files.
  4. Now, to restore the backup, you will need to delete your current website and install a new WordPress site along with the All-in-One WP Migration plugin.
  5. Then go to the tab to import and upload the backup stored on your computer and continue with the restoration.
  6. That is all. Remember that if your site needs an import size greater than 512MByou can increase your upload file size and get unlimited backups with the plugin for a single price of $69.

9. Reupload WordPress Core Files

If nothing seems to be working right, there is a more extreme option to fix the 500 error. It involves replacing all WordPress core files, like so:

  • Download and unzip it on your computer.
  • Go to the unzipped files and delete the file wp-config-sample.php and the folder wp-content to avoid overwriting any important data.
  • and move all WordPress core files to your site location and overwrite existing ones.
  • When the confirmation screen appears, check the options Always use this action Y Apply only to the current queue. This way, you won’t have to confirm the overwrite process for each file.
  • That is all. You just have to wait for the process to finish.
See also  email archives

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

10. Contact your hosting provider

If none of the methods have worked anyway and you still can’t resolve the 500 error, then it’s time to seek further help. Contact your web host’s customer support agents and get assistance. They will be able to check the server logs and locate the cause of your problem.

What causes error 500 (Internal Server Error)?

The most common reasons behind Error 500 are files .htaccess corrupted, a new theme or plugin, an incompatible PHP version, or a WordPress update.

One of the best things you can do to fix this error is to trace your steps. Try to remember what specific event caused your site to stop working. When you know exactly what went wrong, look for the best solution from the list.

Variations of the 500 error

Since there are different web servers, browsers, and operating systems, the 500 error can appear in a variety of ways. Here are some variations you’ll find:

  • 500 Internal Server Error
  • HTTP500
  • Error 500
  • HTTPS 500 error
  • Temporary Error (500)
  • HTTPS error 500
  • HTTP Error 500 – Internal Server Error
  • The website cannot display the page – HTTP 500

In addition to this listing, you may see a white screen or a longer error message asking you to contact the server administrator. It is also becoming more and more common for a custom 500 error page to appear.

conclusion

Everyone who uses WordPress has encountered the HTTP 500 error at least once in their life. However, whether you are an advanced developer or a beginner, fixing the error is quite easy when you know what to do.

This is a quick summary of the methods we have learned today:

  • Deactivate a plugin with a bug through the hPanel or the File Manager.
  • Change WordPress theme to default via phpMyAdmin.
  • Increase PHP memory limit via file .htaccess.
  • Change PHP version to latest from PHP configuration in the hPanel.
  • Enable display of errors via…
Loading Facebook Comments ...
Loading Disqus Comments ...