How to Fix White Screen of Death in WordPress Quickly
wp-config.php.Why This Happens
The white screen of death in WordPress happens when PHP code stops running and shows a blank page. This usually occurs because of a plugin or theme causing a fatal error or when the site runs out of memory.
For example, a plugin with a syntax error or incompatible code can break the site.
<?php // Broken plugin code example function broken_function() { echo 'Hello World'; // Missing semicolon causes fatal error
The Fix
To fix the white screen, first disable all plugins by renaming the plugins folder to plugins_old via FTP or your hosting file manager. Then check if the site loads. If it does, rename the folder back and activate plugins one by one to find the culprit.
Next, switch to a default theme like twentytwentyone by renaming your active theme folder.
Also, increase PHP memory by adding this line to wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
Prevention
To avoid this error in the future, always keep plugins and themes updated and only install trusted ones. Use a staging site to test updates before applying them live. Enable debugging during development by adding define('WP_DEBUG', true); in wp-config.php to catch errors early.
Regularly back up your site so you can restore it if something breaks.
Related Errors
Other errors similar to the white screen of death include:
- 500 Internal Server Error: Often caused by corrupted .htaccess or PHP errors.
- Memory Exhausted Error: When PHP memory limit is too low.
- Parse Error: Syntax errors in PHP files.
Fixes usually involve checking error logs, disabling plugins/themes, and increasing memory limits.