Lion Plugins

How to Fix A WordPress White Screen of Death?

When it comes to your website sometimes things just go wrong. It could be that you recently made a change, or maybe you haven’t even done anything. Depending on what causes the problem many things could have gone wrong resulting in your website failing to be displayed and all you get to see is a white screen. There are a few different things you can try to fix the problem and we will take you through them.

Enable error logging on your website

The first thing you need to do is enable debugging on the website and take a look at the logs. The log file will give you a lot of information what’s going on.

You need to edit the wp-config.php file and find the following line:


define( 'WP_DEBUG', false );

Change it to true:


define( 'WP_DEBUG', true );

N.B. If the line doesn’t exist, then you need to add it. Also you need to add the following lines:


define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );

WP_DEBUG_DISPLAY means that you will not see the errors on front-end, but instead they will be logged to a file. You can then reload the website and any errors, warnings or notices will be displayed on the screen. Then you can just follow the instructions and fix the problems that are displayed.

Usually a blank page or 500 HTTP error occurs when PHP returns a fatal error. Fatal errors are critical errors, they stops the execution of the application, therefore you see a white screen of death.

One of the most common errors is a PHP maximum execution time error. “Fatal error: Maximum execution time of 30 seconds exceeded”. This means your code is taking too long to execute and your server stopped the execution. Usually the maximum execution time setting depends on your hosting provider. You can try to increase it by adding this line


set_time_limit( 300 ); 

to wp-config.php file or


php_value max_execution_time 300

line to .htaccess. If this doesn’t help, you should contact your hosting.

Increase the Amount of Memory for Your Site

It could be that your WordPress site has simply run out of available memory to be able to process requests correctly for your users. This is something that can be fixed with a change to your configuration files. You will need to use your control panel or file manager to access the wp-config.php that sites within the public_html folder. In this file, you need to look for the line that reads ‘/* That’s all, stop editing! Happy blogging. */ ‘ then before this line add the following code:


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

Save and close the file and then reload the website. If the white screen is gone then this has fixed your problem.

Check the Plug-ins. Deactivate one by one.

First, you need to try disabling all of your plug-ins. Open the file manager for your site and navigate to the public_html -> wp-content folder. If you then rename the ‘plugins’ folder to something like ‘_plugins’ then this will cause WordPress to think that you have no plug-ins installed. When you reload the website if it now works, then this means one of your plug-ins is causing the problem. You will need to undo the change you just made and then go through the control panel and disable the plug-ins one at a time until you find the offending plug-in. You can then disable or replace just this offending plug-in and your site will be fine.

Check the Theme

If neither of the above tricks work, then it may be that the theme you are using is causing the problem. To check this then you need to revert the site to the default ‘twentyseventeen’ theme. You will need to go to the wp-options in the PHP admin panel. You are looking for the template and stylesheet values. You need to reset these to be ‘twentyseventeen’ once you have done this you can reload the site and if it works then you know the problem is with the theme. Another way to do deactivate WordPress theme is to rename your current theme in wp-content -> themes folder to something like this ‘_old_current_theme_name’ and upload a new theme through FTP using current theme’s folder name.