How to Fix the White Screen of Death in WordPress
Blog / General / PHP / Plugin / WordPress Elementor
The infamous White Screen of Death (WSOD) is one of the most common issues that WordPress developers face. It happens when your site stops working, and all that displays is a blank, white screen, leaving both users and administrators in the dark. This issue can be particularly frustrating, especially if you’re a beginner. However, it’s usually fixable without too much effort. This post will walk you through various causes of WSOD and how to fix them.
What Causes the White Screen of Death?
WSOD can happen due to a variety of reasons, such as:
1. PHP Memory Limit Exhaustion:
WordPress needs memory to run, and when it exceeds this limit, the site stops loading.
2. Plugin or Theme Conflict:
A buggy plugin or theme can conflict with your WordPress installation, leading to WSOD.
3. Syntax Errors in Code:
A mistyped piece of PHP code in your theme or plugin can lead to WSOD.
4. Exhausted Server Resources:
If your hosting server is overburdened, your site may not have the resources to load properly.
Step-by-Step Troubleshooting for White Screen of Death
1. Check if the issue is isolated to the admin area or the entire site:
Sometimes WSOD will affect only the frontend or the admin area of your site. If the admin area is still accessible, the problem is usually plugin-related.
2. Disable Plugins and Themes:
The quickest fix for plugin-related WSOD is to disable all plugins. You can do this via FTP or cPanel:
- Access your site’s files using an FTP client or the file manager in cPanel.
- Navigate to
wp-content/plugins
and rename theplugins
folder to something likeplugins_disabled
. - Reload your website to see if it comes back. If it does, you’ve confirmed a plugin is the issue. Rename the folder back to
plugins
, and then deactivate plugins one by one from the WordPress dashboard to find the problematic plugin.
3. Switch to a Default Theme:
If the issue persists, it may be a theme conflict. Switch your theme to a default WordPress theme like Twenty Twenty-One:
- Again, use FTP to access the
wp-content/themes
folder. - Rename your active theme’s folder to disable it.
- WordPress will automatically switch to a default theme.
4. Increase PHP Memory Limit:
WSOD may occur when WordPress runs out of memory. You can increase the memory limit by editing the wp-config.php
file:
- Add the following line to your
wp-config.php
file:
define('WP_MEMORY_LIMIT', '256M');
5. Enable Debugging Mode:
To diagnose the error, you can enable debugging in WordPress by editing the wp-config.php
file:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
This will log any errors in the wp-content/debug.log
file, allowing you to identify the root cause.
6. Reinstall Core Files:
If none of the above steps work, you may need to reinstall WordPress core files. Download a fresh version from wordpress.org and replace the wp-admin
and wp-includes
folders on your server.