Fixing the WordPress White Screen of Death
The White Screen of Death (WSOD) is one of the most common WordPress errors. Your site displays a completely blank page with no error message, making it difficult to diagnose. Here is how to identify and fix the cause.
Step 1: Enable Debugging
The first step is to see the actual error message. Connect to your site via File Manager in cPanel or FTP and edit wp-config.php:
Find the line define('WP_DEBUG', false); and change it to:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
Refresh your site. If the error is now visible, it will tell you exactly which file and line is causing the problem. Check the debug log at wp-content/debug.log for details.
Step 2: Disable All Plugins
A faulty plugin is the most common cause of WSOD:
- In cPanel File Manager, navigate to
wp-content. - Rename the
pluginsfolder toplugins_disabled. - Refresh your site. If it loads, a plugin is the culprit.
- Rename the folder back to
plugins. All plugins will be deactivated. - Log in to WordPress admin and activate plugins one by one until you find the one causing the problem.
Step 3: Switch to a Default Theme
If disabling plugins does not fix it, the issue may be with your theme:
- In File Manager, navigate to
wp-content/themes. - Rename your active theme's folder (e.g.,
mythemetomytheme_disabled). - WordPress will automatically fall back to a default theme like Twenty Twenty-Four.
- If the site loads, your theme has a bug or compatibility issue.
Step 4: Increase PHP Memory Limit
Sometimes the WSOD is caused by insufficient PHP memory. Add this line to wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
Step 5: Check for Corrupted Core Files
If none of the above works, WordPress core files may be corrupted. Download a fresh copy of WordPress from wordpress.org and upload the wp-admin and wp-includes folders to your site, overwriting the existing files. Do not overwrite wp-content as that contains your themes, plugins, and uploads.
Prevention
- Always back up before updating plugins, themes, or WordPress core.
- Test updates on a staging site before applying them to your live site.
- Use well-maintained, reputable plugins and themes from trusted developers.