How to Fix the WordPress White Screen of Death

shape
shape
shape
shape
shape
shape
shape
shape

How to Resolve the WordPress White Screen of Death

The WordPress white screen of death is a common and frustrating error that occurs without any error messages, leaving you locked out of your WordPress site. Additionally, this error might affect specific parts of your website, such as the admin area or certain posts.

In this article, we’ll guide you through step-by-step solutions to fix the WordPress white screen of death and restore functionality to your site.

Note: Before implementing any changes, ensure you have a backup of your WordPress site. If you can’t access the admin area, refer to our guide on manually creating a WordPress database backup.

Why You Encounter the WordPress White Screen of Death?

Encountering the white screen of death in WordPress often indicates that a script on your website has exceeded the memory limit. The unresponsive script may either be terminated by your WordPress hosting server or time out, resulting in a blank white screen without generating an error message.

While a blank screen is the common manifestation, sometimes, you might see a critical error message instead.

For instance, you may come across a message stating ‘There has been a critical error on your website’. Essentially, whether it’s a blank screen or a critical error message, it signifies the same underlying issue.

This error can be triggered by poorly coded themes or plugins installed on your site, or even issues with your web hosting server. As the white screen error can stem from various causes, resolving it requires a systematic troubleshooting approach.

 

1. Verify if the Issue Persists on Other Sites

Begin by checking whether the white screen problem occurs on other WordPress sites within the same hosting account.

If the issue affects multiple sites, it indicates a potential problem with your WordPress hosting service. This could be a temporary glitch, and you should contact their support for assistance.

However, if the problem is specific to one website or a particular section of that site, it confirms that the issue is within that particular website.

2. Resolve the White Screen Error Using WordPress Recovery Mode

If the white screen of death error is triggered by a problematic WordPress plugin or theme, WordPress itself may be able to detect it.

The fatal error protection feature, introduced in WordPress 5.2, can intercept the error, preventing a white screen and displaying a message indicating technical difficulties.

Site Experiencing Technical Difficulties Error Message
WordPress will also send an email notification to your admin email address with the subject ‘Your Site is Experiencing a Technical Issue.’

Technical Difficulties Email With Link to Recovery Mode
This email will identify the plugin or theme causing the error and provide a special link.

Using this link, you can access the WordPress recovery mode dashboard and deactivate the problematic plugin.

WordPress Recovery Mode Dashboard
However, if you encounter the plain white screen of death without receiving an email or recovery mode option, you’ll need to address the issue manually.

3. Enhance the Memory Limit

Typically, the white screen error occurs when a script consumes all available memory on your web server and abruptly terminates.

To address this issue, you must augment the PHP memory allocated to WordPress. This allows the script to utilize more memory, completing its intended task.

You can achieve this by modifying the wp-config.php file on your WordPress site or utilizing a code snippet plugin like WPCode.

For detailed instructions, refer to our tutorial on increasing PHP memory in WordPress.

4. Resolve the White Screen Error by Deactivating All Plugins

If increasing the PHP memory limit proves ineffective, especially with a high memory limit like 256M or 512M, it’s time to troubleshoot.

In our troubleshooting experience, we’ve consistently found that the problem often lies with a particular plugin or theme. Let’s proceed by deactivating all plugins.

If you can still access the WordPress admin dashboard, navigate to the ‘Plugins » Installed Plugins’ page. Select all installed plugins and then choose ‘Deactivate’ from the ‘Bulk actions’ dropdown.

Deactivate all WordPress plugins
However, if you lack access to the WordPress admin area, you’ll need to deactivate all plugins via FTP.

Connect to your WordPress site using an FTP client or your hosting provider’s file manager. Once connected, go to the ‘wp-content’ folder, where the ‘plugins’ folder is located.

Now, right-click on the ‘plugins’ folder and choose ‘Rename’. Rename the folder to ‘plugins-deactivated’.

Using FTP to Rename the Plugins Folder
WordPress searches for a folder named ‘plugins’ to load all plugins. When it can’t find the folder, it deactivates all plugins.

If this resolves the issue, proceed to enable one plugin at a time to identify the problematic one. Once identified, you can replace it with an alternative or report the issue to the plugin authors.

5. Switch to the Default Theme

If troubleshooting plugins doesn’t resolve the issue, consider replacing your active theme with a default theme.

First, connect to your website using an FTP client and navigate to the ‘/wp-content/themes/’ folder, where all installed themes are stored.

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

Using FTP to Download the Current Theme as a Backup
Next, delete your current theme from your website.

Simply right-click on your theme folder and select ‘Delete’. Your FTP client will remove the theme from your website.

Using FTP to Delete the Current Theme
If you have a default WordPress theme like (Twenty Twenty-Two or Twenty Twenty-Three) installed on your website, WordPress will automatically switch to it as the default theme.

However, if you don’t have a default theme installed, manually install one using FTP.

If this resolves the issue, inspect your theme’s functions.php file. Remove any extra spaces at the bottom of the file, as this can sometimes cause the problem.

If you suspect a poorly coded function in your theme’s functions.php file, download a fresh copy of your theme from its source and install it manually using FTP.

6. Activate Debug Mode to Identify Errors in WordPress

If previous solutions haven’t resolved the issue, the next step is to enable debugging in WordPress. This will generate error logs, providing insights into the types of errors occurring.

Simply insert the following code into your wp-config.php file:

				
					define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
				
			

After adding this code, the blank screen will display errors, warnings, and notices that can aid in identifying the root cause.

If no errors are visible, you can still check the debug log. Navigate to the wp-content folder on your website using an FTP client, where you’ll find a new debug.log file containing a log of all errors, notices, and warnings.

7. Clearing the WordPress Cache

At times, you might have access to the backend, but the front end of the site shows the white screen of death.

This could be due to a caching plugin. In such cases, you just need to clear your WordPress cache.

For detailed instructions, refer to our guide on how to clear the cache in WordPress.

8. Fixing the White Screen Error for Longer Articles

If you encounter the white screen of death specifically on lengthy posts or pages, this method might resolve the issue.

This solution involves enhancing PHP’s text processing capability by adjusting the recursion and backtrack limit. Insert the following code into your wp-config.php file:

				
					/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);
				
			

We acknowledge the frustration associated with this error and trust that one of the solutions mentioned above has resolved the issue for you.

Leave a Reply

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