How to Fix White Screen of Death in WordPress

Have you ever encountered a blank white screen instead of your WordPress site’s content? If yes, then you have experienced the dreaded white screen of death (WSOD). This is one of the most common and frustrating errors that WordPress users face. In this blog, we will explain what causes WSOD, how to troubleshoot it, and how to fix it.

What Causes White Screen of Death?

WSOD can occur due to various reasons, but the most common ones are:

  • Exhausted Memory Limit: WordPress requires a certain amount of memory to run smoothly. If your site exceeds the memory limit allocated by your hosting provider or your wp-config.php file, it may result in WSOD.
  • Incompatible Plugins or Themes: Sometimes, plugins or themes may conflict with each other or with the WordPress core. This can happen due to coding errors, outdated versions, or missing files. If a plugin or theme causes WSOD, it may affect the whole site or a specific part of it, such as the admin area or a single page.
  • Corrupted Core Files: WordPress core files are the essential files that make up the WordPress software. If these files are corrupted, damaged, or modified, they may cause WSOD. This can happen due to hacking, malware, or accidental changes.

How to Troubleshoot and Fix White Screen of Death in WordPress

White screen of death (WSOD) is one of the most common and frustrating errors that WordPress users face. It shows a blank white screen instead of your site’s content, making it inaccessible to you and your visitors. WSOD can occur due to various reasons, such as exhausted memory limit, incompatible plugins or themes, or corrupted core files. In this blog, we will show you how to troubleshoot and fix WSOD in WordPress step by step.

How to Troubleshoot White Screen of Death?

Before you try to fix WSOD, you need to identify the cause of it. There are three methods you can use to troubleshoot WSOD: enabling debug mode, checking the error log, and using troubleshooting mode.

Enable Debug Mode

Debug mode is a feature that allows you to see the errors and warnings that occur on your site. To enable debug mode, you need to edit the wp-config.php file, which is located in the root folder of your WordPress installation. You can access this file using an FTP client or a file manager provided by your hosting provider.

Once you have opened the wp-config.php file, look for this line:

define( 'WP_DEBUG', false );

Change the value from false to true, so it looks like this:

define( 'WP_DEBUG', true );

Save the file and refresh your site. You should now see the error messages on your screen, which can help you pinpoint the source of WSOD. For example, if you see something like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/user/public_html/wp-includes/plugin.php on line 571

This means that your site has exceeded the memory limit and you need to increase it.

Check the Error Log

Error log is a file that records the errors and warnings that occur on your site. To access the error log, you need to use an FTP client or a file manager and navigate to the wp-content folder. There you will find a file named debug.log, which contains the error log.

You can open this file and look for any clues that indicate the cause of WSOD. For example, if you see something like this:

PHP Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/user/public_html/wp-includes/pluggable.php on line 1296

This means that there is an output error in your theme’s functions.php file and you need to fix it.

Troubleshooting Mode

Troubleshooting mode is a feature that allows you to deactivate all plugins and switch to a default theme without affecting your live site. This can help you isolate the plugin or theme that causes WSOD. To use troubleshooting mode, you need to install and activate the [Health Check & Troubleshooting] plugin. Then go to Tools > Site Health > Troubleshooting and click on Enable Troubleshooting Mode.

This will create a separate session for you where you can test your site without plugins and themes. You can then reactivate them one by one and see which one causes WSOD. For example, if you reactivate a plugin named XYZ and your site goes blank again, then you know that XYZ is the culprit.

How to Fix White Screen of Death?

Once you have identified the cause of WSOD, you can try one of the following solutions:

Increase the Memory Limit

If WSOD is caused by exhausted memory limit, you can try increasing it by editing the wp-config.php file and adding this line:

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

This will increase the memory limit to 256 MB. You can also contact your hosting provider and ask them to increase the memory limit for you.

Deactivate Plugins or Themes

If you suspect that a plugin or theme is causing WSOD, you can try deactivating it to see if your site works again. There are two methods you can use to deactivate plugins or themes: using troubleshooting mode or renaming their folders.

Using Troubleshooting Mode

Troubleshooting mode is a feature that allows you to deactivate all plugins and switch to a default theme without affecting your live site. This can help you isolate the plugin or theme that causes WSOD. To use troubleshooting mode, you need to install and activate the [Health Check & Troubleshooting] plugin. Then go to Tools > Site Health > Troubleshooting and click on Enable Troubleshooting Mode.

This will create a separate session for you where you can test your site without plugins and themes. You can then reactivate them one by one and see which one causes WSOD. For example, if you reactivate a plugin named XYZ and your site goes blank again, then you know that XYZ is the culprit.

To deactivate the plugin or theme that causes WSOD, you can go to Plugins > Installed Plugins or Appearance > Themes and click on Deactivate. Alternatively, you can go back to Tools > Site Health > Troubleshooting and click on Disable Troubleshooting Mode. This will deactivate all plugins and themes except the ones that were active before you enabled troubleshooting mode.

Renaming Their Folders

Another method to deactivate plugins or themes is by renaming their folders via FTP or file manager. This will prevent WordPress from loading them and restore your site. To do this, you need to use an FTP client or a file manager provided by your hosting provider and navigate to the wp-content folder. There you will find two subfolders named plugins and themes, which contain all your installed plugins and themes.

To deactivate a plugin or theme, you need to rename its folder by adding an underscore () or any other character at the end of its name. For example, if you want to deactivate a plugin named XYZ, you can rename its folder from xyz to xyz. This will deactivate the plugin and restore your site. You can then delete or update the plugin or theme that causes WSOD.

How to Restore Core Files

Core files are the essential files that make up the WordPress software. If these files are corrupted, damaged, or modified, they may cause WSOD. To fix this, you need to restore the core files by downloading a fresh copy of WordPress from [WordPress.org] and uploading it via FTP or file manager.

To do this, you need to follow these steps:

  • Step 1: Download WordPress from [WordPress.org]. Make sure you download the same version as your current WordPress installation.
  • Step 2: Extract the downloaded zip file on your computer. You will see a folder named wordpress, which contains all the core files.
  • Step 3: Use an FTP client or a file manager and navigate to the root folder of your WordPress installation. There you will see three folders named wp-admin, wp-includes, and wp-content.
  • Step 4: Delete the wp-admin and wp-includes folders from your server. Do not delete the wp-content folder or the wp-config.php file, as they contain your site’s information and settings.
  • Step 5: Upload the wp-admin and wp-includes folders from the wordpress folder on your computer to your server. Make sure you overwrite any existing files.
  • Step 6: Refresh your site and see if WSOD is fixed.

Conclusion

WSOD is a common WordPress error that can be fixed easily if you know how to troubleshoot it and what causes it. We hope this blog has helped you understand how to fix WSOD in WordPress. If you have any questions or feedback, please leave a comment below.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Leave a Comment

Hostinger

#1 Hosting Provider
Use code : 1FLUID35
For Extra 20% discount.

Onohosting

#1 India's Hosting Provider
Best services at Affordable price!
Starting ₹ 30 / month

Free Online SEO Tools

Explore versatile SEO tools: Meta Tag generator, PDF to JPG, QR Code Generator, IP Lookup, and much more.

Most Popular

Get The Latest Updates

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.

Categories

Move Around On Site

Scroll to Top
small_c_popup.png

Learn how we helped 100 top brands gain success.

Let's have a chat