You have just been working on your WordPress website and making changes or installing an update, and all of a sudden, all you see is a blank page or the Error 500 message, and you no longer have access to your website.
In this article, I will explain how you can fix this problem as quickly as possible so that you, your visitors, and your customers can regain access to your website.
After we fixed the error, I’ll show you how you can use WP STAGING to prevent the White Screen of Death from happening again.
Video: Fix the Blank White Page Error on WordPress
If you prefer watching a video on how to fix the blank white page error on WordPress instead of reading, you can watch this video:
Check out our YouTube Channel.
Enable the Debug Mode
A blank white page always means there is a fatal error happening on your website. So the first step is to tell WordPress to write the error message into a log file or show them on your website’s frontend instead of showing you a blank page.
To enable the WordPress debug mode, we need to edit a few lines in the file
wp-config.php of your WordPress installation. The file wp-config.php is one of your WordPress installation files and has a significant impact on the correct functioning. So be careful when editing this file.
First, log in to your site via FTP or cPanel. I personally like to access the WordPress site via FTP with FileZilla. You can download this FTP client from filezilla-project.org.
Open the file wp-config.php and add the following lines of code:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
If these lines already exist in your wp-config.php file, change their values.
Ensure that you copy the lines exactly as shown, don’t forget any semicolon or other characters.
Paste the copied lines directly above the line
/* That's all, stop editing! Happy publishing. */ as seen below:
The debug.log File
After reloading your website, WordPress will write all PHP errors into the file
debug.log. WordPress saves that file into the folder:
Under rare circumstances and depending on your server settings, your WordPress does not create the debug.log file. In that case, you can tell WordPress to display the errors directly on the screen. To do so, change
WP_DEBUG_DISPLAY to true like this:
Copy this line of code:
define( 'WP_DEBUG_DISPLAY', true );
Please note that not only will you be able to see the PHP error messages on your website. All other visitors are able. So, for security reasons, revert that step when you have fixed your site errors.
Analyzing the Error Message
Based on the information displayed, you can track down the error or do further research. In the case of a white screen of death, a broken plugin or theme often causes that fatal error.
You can see on the screenshot that the fatal error is happening in the file WooCommerce.php on line 46, which is part of the WooCommerce plugin.
This means the plugin WooCommerce is creating a fatal error.
Fix the Blank White Page Error
To fix it, you either have to repair the broken code, or for a much quicker fix, you can disable or delete the error-causing plugin.
One way to disable a plugin is to either rename or delete its main folder using the file manager in cPanel or by using the FTP client.
For instance, to disable WooCommerce, you would need to rename the folder WooCommerce under
This brings back your website and gives you time to fix the plugin.
The debug.log File is not Created
If WordPress does not generate the debug.log, check if there is another file in your website’s root directory, such as
error_log or a folder named
/logs or similar.
Some hosting providers do not create the WordPress debug.log at all. They catch all errors and warnings found by WordPress and write them into a separate log file.
If you do not see any error logs at all, please ask your hosting provider where they store the log files or, as a last resort, tell WordPress to show the errors on the front page as explained before.
Disable the Debug Mode
After using the debug.log, delete the file, and disable further error logging by changing the lines in your wp-config.php file from
define( 'WP_DEBUG', true ); to
define( 'WP_DEBUG', false ); .
Otherwise, unauthorized persons could access that file and would be able to get sensitive information from your server.
Prevent the White Screen of Death
After fixing the errors, let me show you how you can prevent all fatal errors from occurring in the future.
To prevent the White Screen of Death error, you can use our free plugin WP STAGING.
Create a copy of your website, also known as a staging site. From there, you can test updates, plugins, themes, and everything else without affecting your main website.
If you get a white screen of death there, know that you should make these adjustments on your actual production website under no circumstances.