At a certain moment of a WordPress life, running into an issue is normal. As there are many type of error that can occurs on a website, the 500 Internal Server Error is the most common and frustrating, especially and it doesn't provide clues on what is happening.
Fortunately, as many WordPress errors, this can be fixed by digging a little bit on troubleshooting. Using the most obvious solutions can prevent a lot of headaches and make you more confident on fixing these issue on the future.
This tutorial will then share what are the possible causes of the 500 Internal Server issue on WordPress and their fixes.
Concretely, What Is the 500 Internal Server Error in WordPress
As we've mentioned before, many issue might occurs on your website. One of these issue is the internal server issue. If by reaching your website you see a familiar screen, then you're probably experiencing that issue.
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:
The error might vary according to your browser, hosting, etc. But if on the error message you're able to spot the error code 500, then that's probably an internal server error.
Usually, some errors on WordPress are explicit about the source of the problem so that you fix it. However, the 500 Internal Server error, is just a blank screen with a vague context. However, one thing you can be almost true is that the problem is attributed to your website or server (rather than, the browser). Some common and possible causes of this error message include:
- A corrupted .htaccess or WordPress core file
- WordPress compatibility with other plugins/theme
- An exhausted PHP memory limit on your server
While sometimes, waiting for a minute or two and reloading the page is enough to solve the issue, as it’s possible that the server was just temporarily overloaded.
This might also help to determine whether everyone is experiencing this error on your site or if it’s only happening on your end. Sometimes, you'll then use tools like Down for Everyone or Just Me and see if everyone has the same access issue.
If after a certain time the issue doesn't seems to be fixed, then you can go through a deep review of the issue with the following troubleshooting.
How to Fix the 500 Internal Server Error in WordPress (8 Solutions)
Before doing anything it's safe to backup your database. This will help us to restore in case something bad happens. The following methods involve modifying your site’s root directory and some files. If you're not familiar with that, you should probably contact an expert.
Once you’ve done this, you can proceed. Let’s take a look at how to fix the 500 Internal Server Error in WordPress using the following methods.
Deactivate All Your WordPress Plugins
A possible cause of this issue might be a plugin that has a problem. This check whether it's 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 the cause.
You should note that even if your plugins are disabled, it doesn't mean all your data are deleted. Disabling plugins only stop it from executing, and if the plugin that caused the issue was enabled, you might then be able to see your website working again.
If you have access to your WordPress dashboard 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:
If you don’t have access to your dashboard, you can disable your plugins via FTP or your 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-disabled”:
Go back to your WordPress website, to see if this resolved the error. If it did, the next step will be to figure out which plugin causes that issue. You can do this by activating them one by one, reloading the site after each activation.
Once the error message returns, you’ll know the plugin that caused the issue. From there, you can either delete it entirely, try reinstalling an updated version, or reach out to the developer for further assistance.
Switch to a Default WordPress Theme
Same as plugins, a faulty theme could cause an internal server error in WordPress. If you’ve recently installed a new theme or updated your existing one, you might want to switch to a default WordPress theme and see if that solves 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.
If you can't access your WordPress dashboard, you can change themes by connecting to your site’s server via FTP. Once connected, navigate to the wp-content > theme folder:
Locate your current active theme’s folder, then rename it by adding “-disabled” 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 the issue is solved. If it does, you might need to contact the developer or change the WordPress theme.
Check With WordPress Debugging
The 500 Internal Server Error is one of the most unpredictable issues. this is truer because of the lack of information available. This is particularly true if you’re facing the "White Screen Of Death" (WSOD).
However, if you enable the debugging mode on your WordPress site, it might 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 provided on the 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 and paste it before the line that says "That's all for editing".
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.
You might note that, you need to have at least some coding knowledge to spot where comes the issue. Usually PHP errors, shows the file where the issue comes from and from there you can check whether disabling that theme or plugin solve the issue (see the method mentioned above).
Increase Your PHP Memory Limit
If by enabling debugging the error was mentioning an exhausted memory available, then you can go ahead and increase the memory. However, that should permanently solve the issue especially as this issue occurs over time if a plugin or WordPress theme uses abnormally the memory available poorly code theme or plugin).
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 place to do that is in 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 before the line where it says "Stop editing" :
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:
It's also possible to change the memory from the Cpanel, from the PHP selector option.
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 or if you can get it by checking the error message.
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. If you're using shared hosting, your request is not likely to be approved. therefore you should consider switching to a more appropriate hosting or plan.
Check Your .htaccess File
One 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 that file to “.htaccess_backup” or something similar.
You can find this file under your site’s root directory. Right-click on the .htaccess file and select Rename:
If you can't see that file, it's because it might be hidden. The reason the .htaccess file is hidden is because some server consider that file as sensitive and then hide it. on your cPanel, you might enable "Show hidden files" option.
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:
This automatically produces a fresh .htaccess file.
Check for PHP Compatibility Issues
Some plugins require a certain version of PHP to work. Therefore, another reason you might be seeing this error is if there is an incompatibility with the PHP version active on your website and the plugin or theme that you have recently updated/installed.
For example, you could be using a plugin that uses old or new functionality that is either lacking or has been deprecated from your actual PHP version. If so, you should be able to determine which plugin is causing the issue by following the steps outlined in the error message.
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:
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.
Reinstall WordPress (Restaure Core Files)
Normally you should have solved that issue. However, if you’re still seeing it, some of your WordPress core files could be corrupted, that's why we need to restore them. To reinstall WordPress, you need to download the latest version of WordPress from WordPress.org, then unzip the folder on your computer.
Then, connect to your server via FTP. In the left-hand window, open the new WordPress folder you've extracted on your computer. Select the wp-includes and wp-admin folders, right-click, and select Upload:
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. Normally on reload, your site should works correctly.
Ultimately, Contact Your Hosting Provider
At this point, if you’ve exhausted all the known solutions that can solve 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.
Maybe the issue comes from the server, and they can fix it. 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.
If you have to handle your WordPress issues, you should be prepared to face a lot of frustrations. The 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.
In the current tutorial, we have shared a wide range of potential fixes you can use to resolve the 500 Internal Server Error in WordPress.
Do you have any questions about how to fix the 500 Internal Server Error in WordPress? Let us know!