How to Troubleshoot and Fix the White Screen of Death in WordPress

  • How Tos, Guides

When a website doesn’t load correctly, the first step for site administrators is to analyze the error message that appears on the screen. This can often reveal the root cause of the problem. However, in WordPress, a common problem manifests as a blank white screen, providing no clues about the underlying issue. This lack of information can make troubleshooting significantly more challenging.

This is a known scenario in the WordPress ecosystem, often called the “White Screen of Death” (WSOD). What makes this issue a cause for concern besides the website being unavailable is not knowing where to start the troubleshooting.

We will explore the WordPress white screen of death, what it is, and how to solve it.

Also read: How to Fix “Error Establishing a Database Connection” in WordPress

What is the WordPress White Screen of Death

The White screen of death in WordPress is a fancy way of saying that the concerned website is unresponsive and facing downtime. When this happens, website visitors are presented with a blank page. But depending on the browser there may be a HTTP 500 error message on the screen. This is why it is important to test the affected website on different browsers to see if it really is an HTTP 500 error or not.

When this error occurs, in most cases, the dashboard will also be inaccessible, with the same resultant white page showing up. This, in turn, means that tasks that could have been done easily need more time and effort.

What Causes the White Screen of Death in WordPress

It’s quite impossible to pinpoint the actual cause of this issue, but we can define it generally by saying it is caused either by PHP errors, database errors, or memory limit issues. This is not very helpful because there are a lot of elements that can interfere with the above and cause issues. 

Usually, plugin issues such as conflicts or poorly optimized ones, and theme issues are the main culprits behind the white screen of death in WordPress. Other causes include a failed auto-update, improper file permissions, or browser cache issues.

Also read: How To Fix the 500 Internal Server Error in WordPress

How to Fix the WordPress White Screen of Death

1. Clear the cache

The first simple step is to try clearing your browser cache and reload the website to see if it loads properly. But if you have tested it out with other browsers and see the website doesn’t load properly, then we can confirm that it is not the cache that is causing the problem.

Now if you are using any cache plugins, clear their cache also. Now this can be tricky if you can’t access the wp-admin dashboard. If so you can try disabling all the plugins entirely through FTP which we will cover shortly.

2. Enable debug mode

Now enabling debug mode in WordPress might give us more details on what is causing the issue. The debug mode can be activated by making changes to wp-config.ph file. Either access this file from the hosting control panel or through a FTP client.

Once you have accessed the file, you need to locate this line define( 'WP_DEBUG', false );

WordPress debug mode deactivated

Once located, change its value from “false” to “true”. Also, add this line just below it.

define( 'WP_DEBUG_LOG', true);

Now, this is what the end result will look like.

WordPress debug mode activated

Once this is done, when you refresh the website, you will see a new screen that offers much more information on what is causing the white screen of death error. Also, look for a file named debug.log that can provide you with more information.

Based on the debug information, you can take the next steps and quickly resolve it.

3. Deactivate all the plugins

Plugin conflicts can cause all sorts of problems when the circumstances are favorable. In such cases, finding the troublesome one and deactivating it is necessary to bring the site back online. But in most cases with the WSOD error in WordPress, you won’t be able to login to the dashboard.

In this scenario, you need to use an FTP client to deactivate all the plugins at once and see if the website comes back online. Firstly, access the files with the FTP client of your choice and head to the wp-content folder. Once here rename the plugins folder to anything you like.

deactivating plugins folder

Renaming this folder will deactivate all the active plugins. Now refresh the website and see if the error is resolved. If so one or more plugins were causing the issues. Now we need to find out which plugin is causing the issue.

Now rename the plugins folder back to its original state and start renaming each of the installed plugins folder until you find the culprit. Every time you rename a plugin folder and save the changes, refresh the website to see if works. If the website starts working as expected after a certain plugin’s folder is renamed, there you have your culprit. From here you can see if there are any pending updates or contact the plugin developer for support.

4. Issue with your installed theme

Sometimes issues with your installed theme can also lead to the WordPress white screen of death. If the dashboard is accessible, switch to any one of the default themes and see if the issue is resolved.

If the dashboard is not available then changing themes will require a bit more steps. The process involves using an FTP client and is similar to the process of deactivating the plugins. Access the wp-content folder through FTP and rename the themes folder to anything you like.

deactivating themes folder

This will deactivate the theme and WordPress will use the latest default theme available. Now see if it fixes the issue. If it does there’s an issue with the theme and contact the developer for support. If the theme is not causing the issue, then rename the folder back to the previous state.

5. Issue with automatic update

Tracing all the events that happened before the issue occurred is always a good starting point. If one such event was a WordPress version update, then the problem stems from the presence of a maintenance.php file.

maintenance.php file in WordPress

The file is created when WordPress is updating and is removed automatically. But if for some reason, WordPress fails to remove this file, the white screen of death can occur. So, delete the file and see if it fixes the issue. Also, take note of your WordPress version to see whether the update was successful or not.

6. Increase your PHP memory limit

As your website grows with more plugins and media the memory requirements also have to be altered to suit the growing needs. There are multiple ways to increase the PHP memory limit in WordPress, for now, we will focus on doing it from the wp-config.php file.

Once the file is open, check for the following code:

define( 'WP_MEMORY_LIMIT', 'xxM' );

If it is not there already,  add the above code, just above /* That’s all, stop editing! Happy publishing. */:

The “xx” is the value that we should be changing. By default, most often it will be “32M”, try increasing it to 128 or 256 and see if it fixes the issue.

7. Review your file and folder permissions

WordPress requires various core files and folders to be fully functional. However, simply having them on your server is not enough. The correct set of permissions has to be enabled to ensure that everything works.

While making changes to the file and folder permissions, you have to be careful, as a wrong value can lead to potential security threats and breaches. The permissions can be changed either from the hosting control panel or via FTP.

We will cover how to do it via the hosting control panel. Login to your control panel and access the root directory which is public_html. Now, right-click on any file or folder and select the change permissions option.

Once you do this you can see the existing permission. The correct file and folder permissions are as follows:

  • Files permission should be 664 or 644.
  • Folders permission should be 775 or 755.
  • For wp-config.php it should be 640.
  • The .htaccess file should have permission set to 644.

8. Restore a backup

Now if getting the site back online as quickly is your goal and you have the habit of creating periodic WordPress backups, then it’s time to restore the website to fix this issue. Now restoring the backup will bring your website back online, but the true cause of the issue will remain a mystery until you do something about it.

Once the website is online, turn off all automatic updates and create a staging environment for troubleshooting your WordPress site. Once within the staging environment, go through the above-mentioned steps and see which one solves the white screen of death for your WordPress site.

Also read: What is WordPress DDoS Attack? 7 Ways To Protect Your Website From DDoS Attacks

Wrapping Up

As troublesome as it seems, the fixes for the issue are pretty straightforward, albeit it takes some time.

The WP Week Newsletter

A weekly newsletter covering updates from the WordPress ecosystem that are relevant and helpful for WordPress agencies, developers, and enthusiasts

Leave your comment

Your email address will not be published. Required fields are marked *