The 8 Methods to Fix the 500 Internal Server Error in WordPress

Jumpstory Download20201211 154809

Running into issues with your WordPress site is a frustrating yet inevitable part of being a website owner. However, the 500 Internal Server Error can be particularly irritating, as it offers limited information on what’s causing the problem — let alone how to fix it.

The good news is that, like most WordPress errors, it can usually be resolved through troubleshooting. Starting with the most common solutions can save you a lot of time and headaches in the long run and help you restore your site much quicker.

In this tutorial, we’ll start by explaining what the 500 Internal Server Error is and some of its potential causes. Then I’ll provide you with eight methods you can use to get your WordPress site back up in no time. Let’s get started!

What Is the 500 Internal Server Error in WordPress

There is a wide range of problems that can occur on a website — one common issue being an internal server error. If you’re experiencing an internal server error, you’ll see something similar to the following message in your browser in place of your website:

500 Error Pg

Depending on your website and browser, the exact error message may vary. For example, it may also present itself as an HTTP 500 Error or HTTP Error 500.

Some error messages in WordPress provide context and details that can help you identify the exact cause and remedy for the problem.

Unfortunately, 500 Internal Server Error is not one of them. In some cases, you may not see an error message at all, but simply a blank white screen, also known as the White Screen of Death (WSoD).

However, one thing you can be almost certain of is that the problem is attributed to your website or server (rather than, for example, your browser). Some common and possible causes of this error message include:

  • A script problem with a third-party theme or plugin installed on your site
  • A corrupted .htaccess or WordPress core file
  • An exhausted PHP memory limit on your server

Though unlikely, sometimes fixing the 500 Internal Server Error is as simple as waiting a minute or two and reloading the page. It’s possible that the server was just temporarily overloaded.

It might also help to determine whether everyone is experiencing this error on your site or if it’s only happening on your end. To do this, you could try entering your URL into the Down for Everyone or Just Me site.

In most cases, you won’t be able to figure out what is causing the issue until you begin troubleshooting. The important thing is that you’re able to resolve it as quickly as possible.

How to Fix the 500 Internal Server Error in WordPress (8 Methods)

Before you get started with troubleshooting, it’s important to first back up your WordPress site. The following methods involve modifying your site’s root directory, so you don’t want to risk losing critical data in the event something goes wrong.

Once you’ve done this, you can get to work. Let’s take a look at how to fix the 500 Internal Server Error in WordPress using eight methods.

1. Enable Debugging

As we’ve discussed, one of the most frustrating aspects of dealing with an internal server error in WordPress is the lack of information available. This is particularly true if you’re facing the WSoD.

However, enabling debugging mode on your WordPress site may help you gain more insight into the issue.

You can do this by editing your wp-config.php file via a File Transfer Protocol (FTP) client, such as FileZilla. Depending on your hosting provider, you can also use File Manager in cPanel.

Once you locate this file, search for ‘WP_DEBUG’. If it’s there, you need to change its value to ‘true’. If not, you can copy and paste the following to the end of the file:

define( "WP_DEBUG", true );

When you’re done, save your file, then reload your WordPress site. Hopefully, the blank screen is now replaced with an error message, and ideally, a specific line of code where you can locate the problem.

If not, you’ll need to move on to the next method. Just remember to change the debug value back to ‘false’ when you’re done.

2. Deactivate Your WordPress Plugins

Another reason you might be seeing this error message is that there’s a problem with one of your plugins. To see if this is the case, you can temporarily deactivate all of your WordPress plugins. If this resolves the internal server error, you’ll know that a plugin was to blame.

Note that deactivating your plugins won’t delete them or your data. It only stops the plugin code, which might be triggering the internal server error, from running.

If you have access to your WordPress admin screen, you can deactivate all of your plugins by going to the Plugins menu.

Check the box to select all plugins, then choose Deactivate from the Bulk Actions drop-down menu, then click the Apply button:

Iiiipdeactivate Plugins WordPress

If you don’t have access to your dashboard, you can disable your plugins via FTP or File Manager.

From your site’s root directory, navigate to the wp-content folder, then right-click on your plugins folder, select Rename, and change it to “plugins-deactivated” or “plugins-old”:

Iiiirename Plugins Folder

Return to your site to see if this resolved the error. If it did, the next step will be to figure out which plugin was to blame. You can do this by activating them one by one, reloading the site after each one.

Once the error message returns, you’ll know which plugin was causing the issue. From there, you can either delete it entirely, try reinstalling an updated version, or reach out to the developer for further assistance.

3. Switch to a Default WordPress Theme

Similar to plugins, a faulty theme could be to blame for the internal server error in WordPress. If you’ve recently installed a new theme or updated your existing one, you might want to try switching WordPress themes to see if this fixes the issue.

If you’re able to access your WordPress admin area, you can switch your theme by navigating to Appearance > Themes, then activating a default theme such as Twenty Twenty or downloading one from WordPress.org:

Iiwordpress Default Theme

If you can’t access your WordPress admin, you can change themes by connecting to your site’s server via FTP. Once connected, navigate to the wp-content > themesfolder:

Iiiwordpress Themes Folder

Locate your current theme’s folder, then rename it by adding “-deactivated” to the end of the theme’s name. This will automatically switch it to the default theme, assuming you have it installed.

Reload your site to see if this resolved the error. If it does, you’ll need to get a new WordPress theme or reach out to the theme author to let them know about the issue.

4. Check Your .htaccess File

Another common cause of the 500 Internal Server Error in WordPress is a corrupted .htaccess file. To determine whether this is the issue, you can rename this file to “.htaccess_old” or something similar.

You can find this file under your site’s root directory. Right-click on the .htaccess file and select Rename:

Iiirename Htaccess File

Revisit your site to see if it’s still displaying the error message.

If it isn’t, you can create a new .htaccess file by navigating to your WordPress admin screen, then going to Settings > Permalinks and clicking on the Save Changes button at the bottom of the screen:

Iiwordpress Permalink Settings 1180x427

This automatically produces a fresh .htaccess file. If a corrupted .htaccess file doesn’t seem to be the issue, it’s time to move on.

5. Increase Your PHP Memory Limit

The next step is to see whether you’re encountering the error because you’ve exhausted your server’s PHP memory limit. This could be attributed to a poorly coded theme or plugin, or something else entirely.

You can increase your PHP memory limit in several ways — there are three possible files where you can find or add PHP memory code snippets.

The first is your wp-config.php file. Search for WP_MEMORY_LIMIT and, if it exists, change the value to 256M. If it doesn’t, add the following line to the file:

define('WP_MEMORY_LIMIT', '256M');

You can also look for this snippet of code in the php.ini file, which may or may not exist. If it doesn’t, you can create a blank text file, name it php.ini, then paste in the following code:

memory_limit=256MB

You can also check the .htaccess file. If no memory limit value exists, you can add the following code snippet to the file:

php_value memory_limit 256M

Save the file, then reload your site. If it resolves the error message, you may need to contact your hosting provider to get more information about what is exhausting your memory limit.

Also, some hosting providers don’t let users increase the PHP memory limit themselves. In this case, you might need to reach out to your host to ask them to manually increase it.

6. Check for PHP Version Issues

Some plugins require a certain version of PHP to work. Therefore, another reason you might be seeing this error is if there are incompatibility issues with PHP versions between your site and a plugin you have installed.

For example, you could be using a plugin with features deprecated with older versions of PHP. If so, you should be able to determine which plugin is causing the issue by following the steps outlined in the second method on this list.

Ideally, you should be running PHP 7 or higher. The process for checking and upgrading your PHP version will vary depending on your hosting provider. For example, if you have access to cPanel, you can navigate to Select PHP Version under the Software section:

Iiselect Php Version

I recommend checking with your hosting provider for information on upgrading or changing your PHP version. If you’re unable to upgrade your PHP version, and the issue is with a certain plugin, you may need to delete the plugin or find an alternative.

7. Reinstall WordPress Core Files

At this point, you’ve hopefully resolved the 500 Internal Server Error. However, if you’re still seeing it, some of your WordPress core files could be corrupted, in which case, re-uploading them should fix the problem.

To reinstall the WordPress core files, download the latest version of WordPress from WordPress.org, then unzip the folder on your computer.

Next, connect to your server via FTP. In the left-hand window, open the new WordPress folder you just extracted on your computer. Select the wp-includes and wp-admin folders, right-click, and select Upload:

Iiupload WordPress Core

This will replace the files in your site’s root directory. Note: You will be prompted to give your permission for it to overwrite the files, which you should allow. Once you reload your website, you should no longer see the 500 Internal Server Error.

8. Contact Your Hosting Provider

At this point, if you’ve exhausted the above methods and you’re still seeing the 500 Internal Server Error in WordPress, it’s probably time to reach out to your hosting provider for more help. They should be able to check the server logs and offer some insight into what might be causing the issue.

There may some server issues to address in order to resolve the error. They may also be able to assist with other problems that could be contributing to the issue, such as file permissions.

Unfortunately, if you repeatedly run into internal server errors, the problem may be that the server your site is hosted on is not adequately equipped or optimized to run WordPress sites. If this is the case, you might consider switching to a different WordPress host.

Wrapping Up

Dealing with website issues isn’t fun for anyone. However, 500 Internal Server Errors in WordPress are especially troubling because you have limited information to go off of when trying to figure out both the cause and solution.

As we discussed in this post, there is a wide range of potential fixes you can use to resolve the 500 Internal Server Error in WordPress, including the following eight methods:

  1. Enable debugging
  2. Deactivate all your WordPress plugins
  3. Switch your WordPress theme
  4. Check your .htaccess file
  5. Increase your PHP memory
  6. Check for PHP version issues
  7. Reinstall WordPress core files
  8. Contact your hosting provider

POST BY Athemes

close
Share on facebook
Share on whatsapp
Share on twitter
Share on linkedin
Monday 08:00 AM to 19:00 PM
Tues Day 08:00 AM to 19:00 PM
Wednesday 08:00 AM to 19:00 PM
Thursday 08:00 AM to 19:00 PM
Friday 08:00 AM to 19:00 PM
Saturday 09:00 AM to16:30 PM
Sunday Close