You put the site into Debug Mode, then reload the page which will then tell you which file and which plugin or theme the file is in so you can then either remove, update or replace that file which will remove the error. Repeat until site loads properly then take your site out of Debug Mode.
Table of Contents:
What is ‘error 500 blank page’ in WordPress?
A 500 error in WordPress means that some part of the code in your site (or its plugins or themes more likely) has broken but it presents as a blank page because to show the error to anyone browsing the site would be a security issue. Hence you have to put your WordPress site in ‘Debug Mode’ and diagnose the issue further in order to fix. A 500 error is generic to a degree but if you use Debug Mode you can get specifics as to how to fix.
A ‘500 error’ or ‘http 500 error’ as it is also known can happen regardless of your host or your theme. It can happen if you are using Elementor or any other page builder and can happen on GoDaddy, Hostinger or any other platform. The key to solving it is always the same.
It sometimes happens that an internal server error in WordPress can happen after migration from one server to another also. The solution is the same as above. Put into Debug Mode, analyze slightly further and take action by removing the offending code.
How to fix “500 internal server error”:
‘500 internal server error’ and ‘500 error’ and ‘http 500 error’ are all the same thing. So, how do you fix an error code 500? You put the site into Debug Mode, reload the page which will then tell you which file and which plugin or theme the file is in so you can then either remove, update or replace that file which will remove the error. Repeat until site loads properly then take your site out of Debug Mode. Let’s look at this process in more detail.
WordPress Debug Mode
By editing your wp-config.php file in the root of your WordPress files you can add a small code snippet to enable Debug Mode in WP. Once you add this code you can reload the page which will show you the specific error.
PROTIP: You can’t do this from the WordPress CMS so you need access to the hosting account.
Server Error Logs
Alternatively if you have access to the host and it’s cPanel then you can try to view the error logs. They differ in location depending on your host but in my experience they are either found directly on the cPanel dashboard (see below image) or in the File Directory (see other image below) for the website itself.
An Error Log is basically just a text file with a line written for each error or warning.
What to do with the error message more precisely
Once you have found the error, either in the log or by printing it out to page in WP Debug mode, it will tell you how to proceed if you are observant. An error Message Looks something like this in WordPress.
You’ll notice that there is a file path and a line number. This tells you what file (ie in what theme or plugin more usefully) has the error been found in and what line of the file.
Based on this you can take one of the steps below.
Note: The list below isn’t exhaustive but should cover many common scenarios.
Uninstall the offending plugin
The file path, if it leads to a plugin, will reveal to you which plugin is failing and causing the error. The solution is to uninstall that plugin or if you have recently upgraded it then you may want to Roll it Back with WP Roll Back.
Roll Back an existing plugin if you recently updated
If the error points to a plugin or theme AND you have recently upgraded some of these then the solution may also be to ‘roll back’ the plugin or theme to the previous version which did not cause the bug (presumably).
Server Memory Error
If the error message instead does not point to, via the file path, a plugin or theme but instead mentions that the memory limit has been reached then this is still fixable but you may have to do some hunting around for the correct Memory setting to update.