The “White Screen of Death” (WSOD) is one issue that you encounter with most WordPress sites. It will look white and empty when you open any website through the browser and were expecting to see some content. This may happen on either the front end or the back end or perhaps both. The causes of WSOD are mainly PHP errors, exhaustion of memory, or otherwise conflicting with themes or plugins. Here’s a troubleshooting guide on how to solve your white screen of death for WordPress:
Steps to Resolve White Screen of Death in WordPress
1. Enable Debugging Mode
i) Access your site files via FTP or your hosting control panel’s file manager.
ii) Locate the wp-config.php
file in the root directory of your WordPress installation.
iii) Add the following lines to enable debugging:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
iv) Visit your site again, and check the wp-content/debug.log
file for any error messages. This file will contain information about PHP errors, which can help pinpoint the problem.
2. Increase PHP Memory Limit
i) Sometimes, the WSOD is due to memory exhaustion. Increasing the PHP memory limit can resolve this.
ii) Edit wp-config.php
:
a) Add the following line to increase the memory limit:
define('WP_MEMORY_LIMIT', '256M');
b) Save the file and check if the WSOD is resolved.
iii) Alternatively, you can increase the memory limit via .htaccess
or php.ini
, depending on your server setup.
3. Disable Plugins
i) A faulty or incompatible plugin can cause the WSOD. Disabling all plugins can help identify the culprit.
ii) Deactivate Plugins
iii. Access your WordPress files via FTP.
iv. Navigate to wp-content/plugins
.
v. Rename the plugins folder to something like plugins_old
. This will deactivate all plugins.
vi. If the WSOD is resolved, rename the folder back to plugins and reactivate each plugin one by one through the WordPress dashboard to identify the problematic plugin.
4. Switch to a Default Theme
i. A faulty or incompatible theme can also cause the WSOD.
ii. Switch Theme
iii. Access your WordPress files via FTP.
iv. Navigate to wp-content/themes
.
v. Rename your active theme’s folder to something like theme_old
.
WordPress will automatically switch to a default theme (like Twenty Twenty-Three). If the WSOD is resolved, the issue is with your theme. Consider updating or replacing it.
5. Check for File Permission Issues
i. Incorrect file permissions can cause the WSOD.
ii. Check and Correct Permissions
- iii. Ensure that directories have 755 permissions and files have 644 permissions.
iv. You can set these permissions using an FTP client or through your hosting control panel.
6. Check for Exhausted PHP Execution Time
If a script runs too long, it might hit the PHP time limit and cause the WSOD.
7. Increase PHP Execution Time
i. Edit your .htaccess
or php.ini
file.
ii. Add or update the following line.
max_execution_time = 300
7. Clear Cache
i. If you are using a caching plugin, try clearing the cache.
ii. Sometimes, the cached version of your site may cause the WSOD. Clearing the cache can resolve this.
8. Reupload Core WordPress Files
i. Corrupted core files can also lead to the WSOD.
ii.Reupload WordPress Core Files
iii. Download the latest version of WordPress from WordPress.org.
iv. Extract the files and upload the wp-admin
and wp-includes directories via FTP to your WordPress installation, replacing the existing ones.
9. Check the .htaccess
File
i. A corrupted or misconfigured .htaccess
file can lead to the WSOD.
ii. Regenerate the .htaccess
File
iii. Rename the existing .htaccess
file to .htaccess_old
.
iv. Go to the WordPress dashboard (if accessible) and navigate to Settings > Permalinks.
v. Click Save Changes without modifying anything. This will generate a new .htaccess
file.
The White Screen of Death can be frustrating, but by following these troubleshooting steps, you should be able to identify and resolve the issue. Make sure to back up your site before making changes.