How to fix the White Screen of Death in WordPress

How to fix the White Screen of Death in WordPress

Are you worried because your WordPress is displaying a white screen? Don’t worry! It is one of the most common WordPress errors, known as the white screen of death. The error does not display any error message, and you get blocked from your WordPress website. Here, we will help you fix the White Screen of Death in WordPress.

What is the white screen of death?

The white screen of death is the error that occurs when your screen turns into a white screen instead of the web page you were trying to access.

It can arise when you are already logged in or while you are trying to log into your wp-admin screen.

This makes your website unavailable to both admin and visitors, and it sometimes affects only a particular part of your website.

Such as, you may only see it inside the WordPress admin area while everything else is working well. In other cases, you may only notice it on a particular post, whereas everything else is fine.

Now, moving on to the methods to fix the white screen of death.

Note: Before making any changes to your site, it is good to create a WordPress site backup.

If you can’t access the admin area, create a WordPress database backup using your hosting c-panel or PhpMyAdmin.

What causes the White Screen of Death?

There are many reasons you may deal with a blank white screen on your site. Sometimes you may see a critical error message rather than a plain white screen.

Whether your screen is displaying a plain white screen or the message “There has been a critical error on your website,” it is the same error.

This error may occur due to a script on your site that has exhausted the memory limit or something wrong with your web hosting server.

In addition, it may arise due to a poorly coded plugin or a theme installed on your website. 

Since many reasons can cause the error, you must fix the white screen of death error carefully. 

Check for the hosting service.

If you own multi websites and you run it on the same hosting account, then you can check that the problem is occurring on other sites as well or not.

If the problem is occurring on other sites, too, then it suggests that the issue is with your WordPress hosting service. This may be a temporary problem. You can speak to their support team for more help.

However, if the issue is only arising with your one website or a particular part of your site, then the problem is only with your particular website.

Fixing the Error with WordPress Recovery Mode

If the error arises due to a WordPress theme or plugin, then WordPress may be able to detect it.

In WordPress 5.2, the new fatal error protection feature introduced may detect the error, so you may not get to see a white screen.

Rather, you will notice a message that the site is experiencing technical difficulties.

You may also receive an email on your admin email address with the subject ‘Your Site has a Technical Issue.’

This email will point out the plugin causing the issue, and it will also contain a specific link. This link lets you log in to the WordPress recovery mode and allow you to deactivate the faulty plugin.

But, if your WordPress is displaying the plain white screen with no email or recovery mode option, then you have to fix the error manually.

Increasing the Memory Limit

Generally, this error arises due to a script that has exhausted the memory limit and stopped in the middle.

To fix this error, you have to increase the PHP memory limit in WordPress. This will let the script use more memory to finish the function completely.

To increase the limit, you can see our step-wise article on how to increase PHP memory in WordPress.

Checking for the Plugins

If increasing the memory limit did not resolve the issue, or you did not get the email or recovery mode option, then you have to start troubleshooting.

The white screen of death error may arise due to a faulty plugin. To find the faulty plugin, you have to disable all the plugins.

If you can log in to the WordPress admin area, then you can go to the Plugins » Installed Plugins page.

After that, Select all the installed plugins and click the ‘Deactivate’ option under the ‘Bulk Actions’ drop-down menu.

But, if you can’t access the WordPress admin area, then you will have to deactivate all plugins via FTP or file manager.

To start, you have to connect to your WordPress site using an FTP client or file manager. After that, visit the wp-content folder, and you will notice the ‘plugins’ folder.

Now, right-click on the plugins folder and then click rename. Rename the plugins folder to anything else like plugins-deactivated.

Now, Your FTP client will rename the plugins folder.

WordPress will now look for a plugins folder to load all plugins. When it is unable to find the folder, it will deactivate all plugins.

After that, if the error gets fixed, then it is one of the plugins that a creating the error. Now, you can activate the plugin one at a time to get the faulty plugin.

When you find out the faulty one, you can delete it and find an alternative plugin for yourself. You can also describe the issue to the plugin developer.

If the error is still displaying on your site, you can move to the next method.

Replace Theme with a Default Theme

If the above plugin solution does not fix the error, you can check for the faulty theme. For that, replace the current theme with a default theme.

If you can log in to your admin area, then switch your theme with a default theme. 

However, if you can’t log in to your admin area, then you have to connect to your website using an FTP client. Then, visit the /wp-content/themes/ folder. It includes all installed themes on your site.

Right-click on your current WordPress theme to select it and download it to your computer for a backup.

Then, you have to delete your current theme from your site. To do that, Right-click on your theme folder and click the ‘Delete’ option. Now, Your FTP client will erase the theme from your WordPress website.

Now, if you have a default theme installed on your websites, such as Twenty Eighteen or Twenty Nineteen, then WordPress will automatically use it as the default theme.

But, if you don’t have a default WordPress theme installed, then you have to install it manually using an FTP client.

If switching the theme resolves the issue, then it was your theme creating the issue. Now you can reinstall a fresh copy of your theme if you want, or you can use other themes.

Enable Debug Mode to Catch Errors in WordPress

If any solution could not resolve the issue, then you can turn on debugging mode in WordPress. This will let you see what type of errors are occurring.

For that, add the code below into your wp-config.php file.

 define( 'WP_DEBUG', true);

define( 'WP_DEBUG_LOG', true );

After that, the blank screen will display the errors, warnings, and notifications. They may be able to help you find out the root cause.

If you don’t see any errors, you can still check the debug log. Visit the wp-content folder on your site using an FTP client.

There you will notice a new debug.log file containing a log of all notices, errors, and warnings.

Then you can act according to the error displayed.

Clear WordPress Cache

Sometimes, you are able to access the backend, while the front-end of the site is displaying the white screen of death error. You can try clearing your cache.

To empty your cache, you can see our tutorial on how to clear cache in WordPress for more details.

Fixing Longer Articles

If your WordPress site displays the white screen of death only on a very long post or page, this trick may help.

This trick increases PHP’s text processing capability by boosting the recursion and backtrack limit. You can paste the code in your wp-config.php file.

 /** Trick for long posts */

ini_set('pcre.recursion_limit',20000000);

ini_set('pcre.backtrack_limit',10000000);

 To conclude, if you see the white screen of death in WordPress, you can try the above solutions to fix the issue. We hope this write-up helped you fix the white screen of death in WordPress.

 If you are experiencing any other error on your site, you can fix it by following the steps told in our other article on what to do when you are logged out of the WordPress admin area.

Leave a Comment