What Causes the White Screen of Death?
The WSOD can be triggered by several factors, including:
- Plugin or Theme Conflicts: Incompatible or poorly coded plugins and themes.
- Memory Limit Exhaustion: PHP memory limit exceeded.
- Syntax Errors: Mistakes in your site’s code, particularly in the
functions.phpfile. - Corrupted Files: Issues with core WordPress files to avoid WordPress White Screen.
Table of Contents
Step-by-Step Solutions to Fix the White Screen of Death
1. Increase Memory Limit
One of the most common causes of the WSOD is a lack of memory. To increase your PHP memory limit:
- Edit the
wp-config.phpfile:- Access your site via FTP or the file manager in your hosting control panel.
- Locate the
wp-config.phpfile in the root directory of your WordPress installation. - WordPress White Screen :Add the following line of code before the line that says “That’s all, stop editing! Happy blogging.”:
php
define(‘WP_MEMORY_LIMIT’, ‘128M’);
Edit the .htaccess file:
- In the root directory, locate the
.htaccessfile. - Add the following line at the end of the file:
php_value memory_limit 128M
Edit the php.ini file (if you have access):
- Locate your
php.inifile. - Add or modify the following line
memory_limit = 128M
2. Disable All Plugins
Plugins can often cause conflicts that lead to the WSOD. To identify if a plugin is the issue:
- Disable plugins via the WordPress dashboard for WordPress White Screen:
- If you have access to the dashboard, go to
Plugins>Installed Plugins. - Select all plugins and choose
Deactivatefrom the bulk actions menu.
- If you have access to the dashboard, go to
- Disable plugins via FTP or File Manager:
- Access your site’s files and navigate to
wp-content. - Rename the
pluginsfolder to something likeplugins_old. - Check your site to see if it loads. If it does, a plugin is the culprit.
- Rename the
plugins_oldfolder back toplugins. - Rename each plugin folder inside
pluginsone by one, checking your site each time.
- Access your site’s files and navigate to
3. Switch to a Default Theme
Themes can also cause WSOD, especially if they are not compatible with the latest version of WordPress.
- Switch themes via the WordPress dashboard:
- If you can access the dashboard, go to
Appearance>Themes. - Activate a default theme like
Twenty Twenty-One.
- If you can access the dashboard, go to
- Switch themes via FTP or File Manager:
- Access your site’s files and navigate to
wp-content/themes. - Rename your active theme’s folder to something else.
- WordPress will automatically revert to a default theme if it’s installed.
- Access your site’s files and navigate to
4. Enable Debugging
Enabling WordPress debugging can provide error messages that help identify the cause of the WSOD.
- Edit the
wp-config.phpfile:- Add or modify the following lines
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
- This will create a debug log (
debug.log) in thewp-contentdirectory.
5. Repair Corrupted Files to resolve WordPress White Screen
Corrupted core files can also cause the WSOD.
- Re-upload core WordPress files:
- Download a fresh copy of WordPress from wordpress.org.
- Extract the files and upload the
wp-adminandwp-includesdirectories to your site via FTP, overwriting the existing directories.
6. Check for Syntax Errors
If you recently edited code on your site, a syntax error could be causing the WSOD.
- Review recent code changes:
- Access your site’s files and review any recent changes to the
functions.phpfile or other custom code WordPress White Screen . - Look for missing semicolons, brackets, or other syntax errors.
- Access your site’s files and review any recent changes to the
- Restore from backup:
- If you have a recent backup of your site, restoring it can resolve the issue.
Conclusion
The WordPress White Screen of Death can be daunting, but with systematic troubleshooting, it can be resolved. By increasing the memory limit, disabling plugins, switching themes, enabling debugging, repairing corrupted files, and checking for syntax errors, you can identify and fix the underlying issue, ensuring your site is back online. Regular backups and updates can help prevent future occurrences of the WSOD, maintaining a smooth and stable WordPress experience.

