"There Has Been a Critical Error on This Website" — How to Fix It in WordPress (2026)
A blank page with a single sentence — "There has been a critical error on this website. Learn more about troubleshooting WordPress." — is WordPress's polite way of saying PHP just crashed. Here's how to find the actual error and recover the site, in order from fastest to most thorough.
Key Takeaways
- The "critical error" screen replaces the old White Screen of Death — added in WordPress 5.2 along with recovery mode.
- Always check the admin email first: WordPress sends a recovery link that auto-pauses the broken plugin.
- If no email arrives, enable
WP_DEBUG_LOGinwp-config.phpto write the real error towp-content/debug.log. - Most causes (in order): plugin update broke compatibility, theme update, PHP version mismatch, exhausted memory limit, corrupted .htaccess.
- Disable plugins from FTP/SFTP by renaming
wp-content/plugins/PLUGIN-NAMEtoPLUGIN-NAME.disabled— WordPress treats it as deactivated.
What the Critical Error Screen Actually Means
WordPress 5.2 introduced "Site Health" and a new fatal error handler. Before 5.2, a PHP fatal error showed visitors a blank white page (the WSOD). Since 5.2, WordPress catches the error, hides it from the public, and shows a generic message:
There has been a critical error on this website.
Learn more about troubleshooting WordPress.
At the same time, WordPress emails the site administrator a one-time recovery mode link. Clicking it loads wp-admin with the broken plugin or theme deactivated, so you can investigate without the site staying down.
wp-recovery-mode.
Fix #1: Check the Admin Email for the Recovery Link
This is the fastest path — try it before anything else:
- Open the inbox of the email set in Settings → General → Administration Email Address. Check spam too.
- Look for a message with subject like "Your Site is Experiencing a Technical Issue" from
[email protected]. - Click the recovery link inside. WordPress logs you into wp-admin with the broken plugin paused.
- Go to Plugins — the offender will have a yellow notice. Update it, replace it, or click Deactivate.
wp_mail() itself, or your SMTP plugin is the broken one. Skip to Fix #3.
Fix #2: Turn On WP_DEBUG to See the Real Error
The "critical error" message is intentionally vague to avoid leaking file paths to the public. To see what actually broke, enable debug logging in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true ); // writes to wp-content/debug.log
define( 'WP_DEBUG_DISPLAY', false ); // do NOT show errors to visitors
@ini_set( 'display_errors', 0 );
Reload the broken page, then open wp-content/debug.log via FTP or your hosting file manager. You'll see something like:
PHP Fatal error: Uncaught Error: Call to undefined function create_function()
in /wp-content/plugins/old-cache-plugin/loader.php on line 42
Now you know exactly which file and which line. Once you've identified the cause, set WP_DEBUG back to false — debug logs in production are a security risk.
Fix #3: Disable Plugins via FTP / SFTP / File Manager
If wp-admin is also unreachable, disable plugins by renaming their folders. WordPress only loads plugins from folders that exactly match the registered name:
- Connect to your site via FTP, SFTP, or your host's file manager (cPanel, Plesk, Hostinger).
- Navigate to
/wp-content/plugins/. - Rename the entire
pluginsfolder toplugins-off. WordPress will deactivate every plugin in one shot. - Reload the site. If it loads now, the issue is plugin-related.
- Rename
plugins-offback toplugins, then rename one plugin folder at a time (e.g.,old-plugin→old-plugin.off) until the site breaks again — that's the offender.
If your host gives you SSH access, WP-CLI is faster:
# Deactivate every plugin
wp plugin deactivate --all --skip-plugins --skip-themes
# Or one by one
wp plugin deactivate old-cache-plugin --skip-plugins --skip-themes
Fix #4: Switch to a Default Theme
If renaming the plugins folder didn't help, the theme is the culprit. Same trick:
- Open
/wp-content/themes/. - Rename your active theme's folder (e.g.,
my-theme→my-theme.off). - WordPress falls back to
twentytwentyfive(or the latest default). If the site loads, your theme had a fatal error. - Restore the folder name and edit the broken file directly, or roll back to a previous theme version.
Fix #5: Raise PHP Memory Limit
If the error log says "Allowed memory size of X bytes exhausted", you need more PHP memory. Add to wp-config.php, above the "Happy publishing" line:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // for admin pages
If your hosting plan caps PHP memory below this, you'll need to set memory_limit in php.ini or .htaccess — or upgrade plan. Shared hosting often locks this at 64M or 128M.
Fix #6: Restore .htaccess and Check PHP Version
A corrupted .htaccess can cause infinite redirect or 500 errors that surface as the critical error:
- Rename
.htaccessin your site root to.htaccess.bak. - Reload the site. If it loads, log into wp-admin and go to Settings → Permalinks → just click Save Changes. WordPress regenerates a fresh .htaccess.
- While you're there, check Tools → Site Health → Info → Server. WordPress 6.5+ requires PHP 7.4 minimum, recommends 8.1+. If your host is still on PHP 7.0 or 7.2, plugins built for 8.x will break.
Cause Cheat Sheet
| Symptom in debug.log | Likely cause | Fix |
|---|---|---|
| Call to undefined function | Plugin uses removed PHP function (e.g. create_function) | Update plugin or PHP downgrade |
| Allowed memory size exhausted | Plugin loads too much in memory | Raise WP_MEMORY_LIMIT or disable plugin |
| Maximum execution time exceeded | Slow query, big import | Raise max_execution_time, optimize |
| Cannot redeclare function | Two plugins declare same function | Disable one, rename function |
| Class not found | Composer autoload broken / plugin missing | Reinstall plugin, run composer install |
| White page, no log entry | Crash before WP loads (wp-config typo) | Fix wp-config.php syntax |
How SimpleReview Handles This
If your site is down right now and you don't want to dig through FTP, SimpleReview can do it from the browser:
- Install the Chrome extension and open the broken site.
- Click the SimpleReview icon, then click the "There has been a critical error" message.
- Type "Fix critical error on this site" and click Fix it. SimpleReview connects to your repo, reads the latest debug.log, identifies the file and line that crashed, and opens a PR that disables the offending plugin (or replaces the broken function).
This is particularly useful when wp-admin is unreachable, the recovery email never arrived, and you'd rather not spend 20 minutes renaming folders over SFTP.
Recover Your WordPress Site Without FTP Spelunking
Click on the error message — SimpleReview reads your repo, finds the broken plugin, and opens a PR.
Install SimpleReview Chrome Extension →Prefer a WordPress plugin? Download SimpleReview for WordPress → — installs in 30 seconds, no Chrome required.
Frequently Asked Questions
wp-content/debug.log if WP_DEBUG_LOG is enabled.wp_mail() itself crashed, your SMTP plugin is part of the broken chain, your admin email is wrong, or the message went to spam. Use Fix #2 (debug log) or Fix #3 (rename plugins folder) instead.wp-config.php and set WP_DEBUG, WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false. The error appears in wp-content/debug.log with file path and line number.create_function() removed in PHP 8.0, or each() removed in 8.0) crash. Roll back the plugin or update to its latest version.