How to Fix the WordPress White Screen of Death (and "There Has Been a Critical Error")
You visit your website and see a blank white page, or the message "There has been a critical error on this website." It's alarming, but it's almost always fixable, and your content is usually perfectly safe in the database.
This guide walks through the causes and fixes, from easiest to most technical.
What causes it?
The white screen (and the newer "critical error" message) usually means PHP hit a fatal error and stopped. The most common causes are:
- A plugin update or conflict
- A theme update or a code edit in
functions.php - Running out of PHP memory
- An incompatible PHP version
- A corrupted or incomplete update
Step 1: Check your email for recovery mode
Modern WordPress detects many fatal errors and sends an email to the site's admin address, with the subject "Your Site is Experiencing a Technical Issue". It includes:
- Which plugin or theme caused the error
- A special recovery mode link that lets you log in and fix it
Click the link, log in, and deactivate the plugin or theme it names. That's often the whole fix. Check your spam folder if you don't see it.
Step 2: Think about what just changed
If you just updated a plugin, installed a theme, edited code or changed PHP versions, that's almost certainly the cause. Undo that change first.
Step 3: Deactivate all plugins without logging in
If you can't get into /wp-admin, you can disable plugins through your hosting control panel.
- Log into cPanel or DirectAdmin and open File Manager.
- Go to your site's folder, usually
public_html, thenwp-content. - Rename the
pluginsfolder toplugins-off. - Reload your site.
If the site comes back, a plugin was the culprit. Now:
- Rename
plugins-offback toplugins. Your plugins will now be deactivated. - Log into WordPress and reactivate plugins one at a time, checking the site after each.
- When the error returns, you've found the problem plugin. Leave it deactivated and check for an update, or replace it.
You can also rename just a single plugin's folder inside wp-content/plugins if you already suspect one.
Step 4: Switch to a default theme
If plugins weren't the cause, test the theme:
- In File Manager, go to
wp-content/themes. - Rename your active theme's folder, for example
mythemetomytheme-off. - WordPress will fall back to a default theme if one is installed (such as a "Twenty" theme).
If the site loads, the problem is in your theme. Restore the folder name and check for an update, or undo any recent code edits to functions.php.
Step 5: Turn on debugging to see the real error
To see the actual error message:
- In File Manager, edit
wp-config.phpin your site's root folder. - Find the line
define( 'WP_DEBUG', false );. - Replace it with:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
- Reload your site, then open
wp-content/debug.log.
The last lines usually name the file and line that failed, which points straight at the plugin or theme. When you're done, set WP_DEBUG back to false and delete debug.log, since it can reveal information about your site.
You can also check the Errors or Error Log section in your control panel.
Step 6: Increase the PHP memory limit
If the log mentions "Allowed memory size exhausted", WordPress ran out of memory. Add this line to wp-config.php, above the line that says "That's all, stop editing!":
define( 'WP_MEMORY_LIMIT', '256M' );
If that doesn't help, your account's memory limit may be the real ceiling. A plugin that needs huge amounts of memory is often a sign of a problem with that plugin. Read hosting resource limits explained.
Step 7: Check your PHP version
Old plugins may not work on newer PHP versions, and new plugins may require them. If the error appeared right after a PHP change, switch back and update your plugins and theme before trying again. Look for Select PHP Version or MultiPHP Manager in cPanel, or the PHP version options in DirectAdmin. If you're not sure, ask your host's support team.
Step 8: Fix a stuck or failed update
If an update was interrupted, you may see "Briefly unavailable for scheduled maintenance". In File Manager, delete the .maintenance file in your site's root folder (you may need to show hidden files). Then rerun the update.
If WordPress core files are corrupted, you can replace the wp-admin and wp-includes folders with fresh copies from the same WordPress version. Don't overwrite wp-content or wp-config.php. If you're not comfortable doing this, restore from a backup instead.
Step 9: Restore from a backup
If you can't find the cause quickly, restoring a backup from before the problem is often the fastest route back online. Check your control panel for a restore tool such as JetBackup, or ask your host to restore it.
How to avoid it next time
- Update on a staging site first. See how to create a WordPress staging site.
- Back up before updates. Read how to safely update WordPress.
- Keep plugins lean and well maintained. See how many WordPress plugins is too many?
- Never edit
functions.phplive without a way to undo it.
Still stuck?
Contact your host's support team with your domain, what changed before the error, and any message from debug.log.