Home Tutorials How to Fix the 500 Internal Server Error in WordPress (Eight Strategies)

How to Fix the 500 Internal Server Error in WordPress (Eight Strategies)


Working into points along with your WordPress website is a irritating but inevitable a part of being a web site proprietor. Nonetheless, the 500 Internal Server Error may be significantly irritating, because it gives restricted data on what’s inflicting the drawback — not to mention how to repair it.

The excellent news is that, like most WordPress errors, it could often be resolved by troubleshooting. Beginning with the commonest options can prevent lots of time and complications in the future and show you how to restore your website a lot faster.

On this tutorial, we’ll begin by explaining what the 500 Internal Server Error is and a few of its potential causes. Then I’ll give you eight strategies you should utilize to get your WordPress website again up in no time. Let’s get began!

What Is the 500 Internal Server Error in WordPress

There’s a variety of issues that may happen on a web site — one widespread difficulty being an inside server error. Should you’re experiencing an inside server error, you’ll see one thing related to the following message in your browser in place of your web site:

A 500 Internal Server Error message on a WordPress site.

Relying in your web site and browser, the actual error message could fluctuate. For instance, it could additionally current itself as an HTTP 500 Error or HTTP Error 500.

Some error messages in WordPress present context and particulars that may show you how to establish the actual trigger and treatment for the drawback.

Sadly, 500 Internal Server Error just isn’t certainly one of them. In some circumstances, you might not see an error message in any respect, however merely a clean white display screen, often known as the White Display of Dying (WSoD).

Nonetheless, one factor you may be virtually sure of is that the drawback is attributed to your web site or server (quite than, for instance, your browser). Some widespread and potential causes of this error message embrace:

  • A script drawback with a third-party theme or plugin put in in your website
  • A corrupted .htaccess or WordPress core file
  • An exhausted PHP reminiscence restrict in your server

Although unlikely, typically fixing the 500 Internal Server Error is so simple as ready a minute or two and reloading the web page. It’s potential that the server was simply quickly overloaded.

It may also assist to decide whether or not everyone seems to be experiencing this error in your website or if it’s solely occurring in your finish. To do that, you may attempt coming into your URL into the Down for Everybody or Simply Me website.

Usually, you gained’t have the option to determine what’s inflicting the difficulty till you start troubleshooting. The necessary factor is that you simply’re ready to resolve it as shortly as potential.

How to Fix the 500 Internal Server Error in WordPress (Eight Strategies)

Earlier than you get began with troubleshooting, it’s necessary to first again up your WordPress website. The next strategies contain modifying your website’s root listing, so that you don’t need to danger dropping important knowledge in the occasion one thing goes unsuitable.

When you’ve executed this, you may get to work. Let’s check out how to repair the 500 Internal Server Error in WordPress utilizing eight strategies.

1. Allow Debugging

As we’ve mentioned, certainly one of the most irritating elements of coping with an inside server error in WordPress is the lack of awareness accessible. That is significantly true if you happen to’re going through the WSoD.

Nonetheless, enabling debugging mode in your WordPress website could show you how to acquire extra perception into the difficulty.

You are able to do this by modifying your wp-config.php file through a File Switch Protocol (FTP) consumer, corresponding to FileZilla. Relying in your internet hosting supplier, you may also use File Supervisor in cPanel.

When you find this file, seek for ‘WP_DEBUG’. If it’s there, you want to change its worth to ‘true’. If not, you’ll be able to copy and paste the following to the finish of the file:

outline( "WP_DEBUG", true );

Once you’re executed, save your file, then reload your WordPress website. Hopefully, the clean display screen is now changed with an error message, and ideally, a particular line of code the place you’ll be able to find the drawback.

If not, you’ll want to transfer on to the subsequent methodology. Simply keep in mind to change the debug worth again to ‘false’ once you’re executed.

2. Deactivate Your WordPress Plugins

One more reason you could be seeing this error message is that there’s an issue with certainly one of your plugins. To see if that is the case, you’ll be able to quickly deactivate all your WordPress plugins. If this resolves the inside server error, you’ll know {that a} plugin was to blame.

Be aware that deactivating your plugins gained’t delete them or your knowledge. It solely stops the plugin code, which could be triggering the inside server error, from operating.

When you’ve got entry to your WordPress admin display screen, you’ll be able to deactivate all your plugins by going to the Plugins menu.

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

The 'Deactivate' option on the WordPress Plugins screen.

Should you don’t have entry to your dashboard, you’ll be able to disable your plugins through FTP or File Supervisor.

Out of your website’s root listing, navigate to the wp-content folder, then right-click in your plugins folder, choose Rename, and alter it to “plugins-deactivated” or “plugins-old”:

The option to rename the WordPress plugins folder via FTP.

Return to your website to see if this resolved the error. If it did, the subsequent step might be to determine which plugin was to blame. You are able to do this by activating them one after the other, reloading the website after each.

As soon as the error message returns, you’ll know which plugin was inflicting the difficulty. From there, you’ll be able to both delete it fully, attempt reinstalling an up to date model, or attain out to the developer for additional help.

3. Swap to a Default WordPress Theme

Comparable to plugins, a defective theme may very well be to blame for the inside server error in WordPress. Should you’ve just lately put in a brand new theme or up to date your current one, you may want to attempt switching WordPress themes to see if this fixes the difficulty.

Should you’re ready to entry your WordPress admin space, you’ll be able to swap your theme by navigating to Look > Themes, then activating a default theme corresponding to Twenty Twenty or downloading one from WordPress.org:

The option to activate the Twenty Twenty WordPress theme.

Should you can’t entry your WordPress admin, you’ll be able to change themes by connecting to your website’s server through FTP. As soon as related, navigate to the wp-content > themes folder:

The WordPress themes folder in FTP client.

Find your present theme’s folder, then rename it by including “-deactivated” to the finish of the theme’s identify. This may robotically swap it to the default theme, assuming you might have it put in.

Reload your website to see if this resolved the error. If it does, you’ll want to get a brand new WordPress theme or attain out to the theme writer to allow them to learn about the difficulty.

4. Test Your .htaccess File

One other widespread reason for the 500 Internal Server Error in WordPress is a corrupted .htaccess file. To find out whether or not that is the difficulty, you’ll be able to rename this file to “.htaccess_old” or one thing related.

You could find this file below your website’s root listing. Proper-click on the .htaccess file and choose Rename:

The option to rename the WordPress '.htaccess' file via FTP client.

Revisit your website to see if it’s nonetheless displaying the error message.

If it isn’t, you’ll be able to create a brand new .htaccess file by navigating to your WordPress admin display screen, then going to Settings > Permalinks and clicking on the Save Adjustments button at the backside of the display screen:

The Permalink Settings page in WordPress.

This robotically produces a contemporary .htaccess file. If a corrupted .htaccess file doesn’t appear to be the difficulty, it’s time to transfer on.

5. Improve Your PHP Reminiscence Restrict

The following step is to see whether or not you’re encountering the error since you’ve exhausted your server’s PHP reminiscence restrict. This may very well be attributed to a poorly coded theme or plugin, or one thing else fully.

You’ll be able to enhance your PHP reminiscence restrict in a number of methods — there are three potential recordsdata the place you’ll find or add PHP reminiscence code snippets.

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

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

You may also search for this snippet of code in the php.ini file, which can or could not exist. If it doesn’t, you’ll be able to create a clean textual content file, identify it php.ini, then paste in the following code:

memory_limit=256MB

You may also verify the .htaccess file. If no reminiscence restrict worth exists, you’ll be able to add the following code snippet to the file:

php_value memory_limit 256M

Save the file, then reload your website. If it resolves the error message, you might want to contact your internet hosting supplier to get extra details about what’s exhausting your reminiscence restrict.

Additionally, some internet hosting suppliers don’t let customers enhance the PHP reminiscence restrict themselves. On this case, you would possibly want to attain out to your host to ask them to manually enhance it.

6. Test for PHP Model Points

Some plugins require a sure model of PHP to work. Subsequently, one more reason you could be seeing this error is that if there are incompatibility points with PHP variations between your website and a plugin you might have put in.

For instance, you may be utilizing a plugin with options deprecated with older variations of PHP. In that case, you need to be ready to decide which plugin is inflicting the difficulty by following the steps outlined in the second methodology on this checklist.

Ideally, you need to be operating PHP 7 or larger. The method for checking and upgrading your PHP model will fluctuate relying in your internet hosting supplier. For instance, in case you have entry to cPanel, you’ll be able to navigate to Choose PHP Model below the Software program part:

The 'Select PHP Version' application in cPanel.

I like to recommend checking along with your internet hosting supplier for data on upgrading or altering your PHP model. Should you’re unable to improve your PHP model, and the difficulty is with a sure plugin, you might want to delete the plugin or discover an alternate.

7. Reinstall WordPress Core Information

At this level, you’ve hopefully resolved the 500 Internal Server Error. Nonetheless, if you happen to’re nonetheless seeing it, a few of your WordPress core recordsdata may very well be corrupted, in which case, re-uploading them ought to repair the drawback.

To reinstall the WordPress core recordsdata, obtain the newest model of WordPress from WordPress.org, then unzip the folder in your pc.

Subsequent, join to your server through FTP. In the left-hand window, open the new WordPress folder you simply extracted in your pc. Choose the wp-includes and wp-admin folders, right-click, and choose Add:

The option to upload WordPress Core files via FTP.

This may exchange the recordsdata in your website’s root listing. Be aware: You may be prompted to give your permission for it to overwrite the recordsdata, which it is best to enable. When you reload your web site, it is best to not see the 500 Internal Server Error.

8. Contact Your Internet hosting Supplier

At this level, if you happen to’ve exhausted the above strategies and also you’re nonetheless seeing the 500 Internal Server Error in WordPress, it’s in all probability time to attain out to your internet hosting supplier for extra assist. They need to have the option to verify the server logs and supply some perception into what could be inflicting the difficulty.

There could some server points to deal with in order to resolve the error. They might additionally have the option to help with different issues that may very well be contributing to the difficulty, corresponding to file permissions.

Sadly, if you happen to repeatedly run into inside server errors, the drawback could also be that the server your website is hosted on just isn’t adequately outfitted or optimized to run WordPress websites. If that is the case, you would possibly take into account switching to a special WordPress host.

Wrapping Up

Coping with web site points isn’t enjoyable for anybody. Nonetheless, 500 Internal Server Errors in WordPress are particularly troubling as a result of you might have restricted data to go off of when making an attempt to determine each the trigger and resolution.

As we mentioned in this put up, there’s a variety of potential fixes you should utilize to resolve the 500 Internal Server Error in WordPress, together with the following eight strategies:

  1. Allow debugging
  2. Deactivate all of your WordPress plugins
  3. Swap your WordPress theme
  4. Test your .htaccess file
  5. Improve your PHP reminiscence
  6. Test for PHP model points
  7. Reinstall WordPress core recordsdata
  8. Contact your internet hosting supplier

Do you might have any questions on how to repair the 500 Internal Server Error in WordPress? Tell us in the feedback part beneath!