My site shows a blank white page on the front end (and sometimes wp-admin) after I activated a plugin. No error is displayed. How do I find the cause?
DEV3 Developer Forum
How do I fix the WordPress white screen of death?
Every post is reviewed first. Usually reviewed within 24 hours.
1 reply
A white screen is a PHP fatal error with display turned off. Make WordPress log it.
1. Turn on debug logging in wp-config.php, above the line "That's all, stop editing":
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the page, then read wp-content/debug.log. The last "PHP Fatal error" line names the file and line, which shows the plugin or theme at fault.
2. Typical causes
- Memory exhausted (
Allowed memory size of ... exhausted). See the memory limit topic. - A plugin or theme using a function that does not exist in your PHP version (for example, after upgrading PHP).
- A syntax error from a hand edit of
functions.php. - A corrupted update that left files half-written.
3. Get back in when wp-admin is dead
- Rename the plugin folder over SFTP:
wp-content/plugins/bad-plugintobad-plugin.off. WordPress deactivates it automatically. - If unsure which, rename the whole
pluginsfolder, then restore it and re-enable one by one. - For themes, rename the active theme folder; WordPress falls back to a default theme.
With WP-CLI: wp plugin deactivate --all or wp plugin deactivate bad-plugin.
WordPress 5.2+ also shows "recovery mode" and emails the admin a link when a fatal error occurs; check the admin email inbox.
Pitfall: do not leave WP_DEBUG_DISPLAY true on a live site. Errors leak paths to visitors. Also delete or protect debug.log afterwards, as it is publicly reachable by default at /wp-content/debug.log unless blocked.