Last updated: December 1, 2026 · Skill level: Beginner to intermediate
“There has been a critical error on this website” means PHP hit a fatal error, almost always in a plugin, a theme, or custom code, and WordPress stopped loading the page. To fix it, open the recovery mode link WordPress emailed to the admin address, or turn on WP_DEBUG_LOG, read the file path in the error, and disable that plugin or theme.
TL;DR: the quick fix
- Check the site admin email inbox (and spam) for “Your Site is Experiencing a Technical Issue”. Click the recovery mode link, log in, and deactivate the plugin or theme it names.
- No email? Back up
wp-config.php, then enableWP_DEBUG_LOGand reload the page. Readwp-content/debug.log. - Find the folder in the “PHP Fatal error” line, for example
wp-content/plugins/some-plugin/. - Rename that folder over FTP or your host’s file manager, or run
wp plugin deactivate some-plugin --skip-plugins --skip-themes. - Reload the site. If it works, update, replace, or roll back the extension. Then turn debugging off again.
What does “there has been a critical error on this website” mean?
It means a PHP fatal error stopped WordPress mid-request, and WordPress’s fatal error handler caught it and showed a generic message instead of a blank page. The handler and recovery mode were added in WordPress 5.2. The message hides the real error from visitors, so you need to find it yourself.
According to the WordPress 5.2 recovery mode announcement on Make WordPress Core, the feature lets an administrator get into the dashboard and pause the plugin or theme causing the error. Before 5.2, the same fatal error usually produced the “white screen of death”, an empty white page with no message at all. The critical error screen is the modern version of that same problem.
The wording changes depending on where you see it. In WordPress core’s WP_Fatal_Error_Handler::display_default_error_template() (checked against WordPress 7.1), there are three versions:
| Message you see | Where it shows | What it tells you |
|---|---|---|
| “There has been a critical error on this website.” | Front end, for visitors | A fatal error happened. Nothing more. |
| “…Please check your site admin email inbox for instructions.” | wp-admin and wp-login.php on a single site | A recovery mode email was triggered. |
| “…Please reach out to your site administrator…” | wp-admin on Multisite | Only the network admin can fix it. |
| “…putting it in recovery mode. Please check the Themes and Plugins screens…” | Inside a recovery mode session | The faulty extension was paused for you. |
All versions send an HTTP 500 status code. So uptime monitors may report it as a 500 error, but the cause is a PHP fatal error, not a server misconfiguration.
How do you use the recovery mode email?
Open the email titled “Your Site is Experiencing a Technical Issue”, click the recovery mode link, and log in. WordPress pauses the broken plugin or theme for your session only, so you can deactivate it from the Plugins screen. Visitors still see the error until you actually deactivate or fix it.
- Open the email. It names the plugin or theme and includes the error details, often with the file and line.
- Click the link and log in with an administrator account.
- Go to Plugins (or Appearance › Themes). The paused extension has a notice explaining the error.
- Click Deactivate. Pausing is not the same as deactivating.
- Click Exit Recovery Mode in the admin bar, then load the front end in a private window to confirm the fix.
Where does the email go, and what if it never arrived?
The email goes to the address in Settings › General › Administration Email Address, the admin_email option. The core source for get_recovery_mode_email_address() shows it uses a RECOVERY_MODE_EMAIL constant first if you define one. Note the name. It is RECOVERY_MODE_EMAIL, not WP_RECOVERY_MODE_EMAIL as some tutorials say.
Common reasons the email never shows up:
- Rate limit. Core’s get_email_rate_limit() defaults to one day, so WordPress sends at most one email per day. The link’s lifetime defaults to that same value.
- The admin email is old or belongs to a developer who left.
- The server can’t send mail. Many hosts block PHP
mail(), and if your SMTP plugin is the thing that crashed, nothing gets sent. - The handler is off.
WP_DISABLE_FATAL_ERROR_HANDLERset totrueinwp-config.phpdisables recovery mode entirely.
To send future emails to a mailbox you actually read, back up wp-config.php first, then add this line above /* That's all, stop editing! */ in wp-config.php:
define( 'RECOVERY_MODE_EMAIL', 'you@example.com' );
How do you see the actual error with WP_DEBUG?
Turn on WP_DEBUG and WP_DEBUG_LOG in wp-config.php, keep WP_DEBUG_DISPLAY off, then reload the broken page. WordPress writes the full fatal error, including the file path and line number, to wp-content/debug.log. Visitors never see it.
- Connect with SFTP or your host’s file manager and download a copy of
wp-config.phpas a backup. - Find any existing
define( 'WP_DEBUG', false );line and delete it, so you don’t define the constant twice. - Paste the snippet below into
wp-config.php, above/* That's all, stop editing! Happy publishing. */. - Reload the page that shows the critical error.
- Open
wp-content/debug.logand scroll to the bottom.
// In wp-config.php, above "That's all, stop editing!"
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
This matches the example in WordPress.org’s Debugging in WordPress handbook page. The handbook also notes that WP_DEBUG_LOG accepts a file path instead of true, which is handy if your host makes wp-content public. It warns against leaving debug tools on in production, so remove these lines when you’re done.
Can’t edit files at all? Many hosts also write PHP errors to their own error log in the control panel. Look for “Error log” or “PHP logs” in cPanel, Plesk, or your host’s dashboard.
How do you read the fatal error line?
Look for the last line that starts with “PHP Fatal error”. The path after “in” tells you who to blame. If it contains wp-content/plugins/folder-name/, that plugin caused it. If it contains wp-content/themes/folder-name/, it’s the theme. The error type tells you why.
A typical entry looks like this:
[01-Dec-2026 09:14:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function create_function() in /home/site/public_html/wp-content/plugins/old-slider/inc/widget.php:42
Stack trace:
#0 /home/site/public_html/wp-includes/class-wp-hook.php(324): old_slider_init('')
...
Here the plugin folder is old-slider, and the cause is a function PHP removed in PHP 8.0. The PHP 8.0 backward-incompatible changes page on php.net lists create_function() among the removals. Read the error like this:
| Part of the error | What it means |
|---|---|
Call to undefined function | Code calls a function that doesn’t exist. Often a removed PHP function or a missing dependency plugin. |
Cannot redeclare | Two plugins, or a plugin and the theme, define the same function. |
Allowed memory size of ... bytes exhausted | PHP ran out of memory. |
syntax error, unexpected | A file was edited badly, often functions.php. |
Failed opening required | A file is missing. Incomplete update or corrupted upload. |
Path in wp-content/mu-plugins/ | A must-use plugin. These load even with WP-CLI’s --skip-plugins. |
Path in wp-includes/ or wp-admin/ | Usually a plugin calling core wrongly. Check the stack trace for the first wp-content path. If none, suspect corrupted core files. |
How do you fix a WordPress critical error when you can’t access the admin?
Disable plugins from outside WordPress. Rename the plugin’s folder over FTP or your host’s file manager, or use WP-CLI with --skip-plugins --skip-themes so the broken code never loads. WordPress deactivates any plugin whose folder it can’t find, and the admin usually comes back right away.
Option 1: rename the folder with FTP or a file manager
- Make a backup first, or confirm your host has a recent one.
- Go to
wp-content/plugins/. - If you know the culprit, rename only its folder, for example
old-slidertoold-slider.off. - If you don’t know, rename the whole
pluginsfolder toplugins.off. This deactivates every plugin. - Reload the site. If it works, rename
plugins.offback toplugins. The plugins stay deactivated. - Reactivate plugins one at a time in Plugins until the error returns. The last one you activated is the cause.
Option 2: use WP-CLI over SSH
WP-CLI is the official command-line tool for WordPress. The WP-CLI global parameters reference says --skip-plugins skips loading plugins (mu-plugins still load) and --skip-themes skips loading themes. That lets WP-CLI run even when the site is broken. Run these from the WordPress root folder:
# Back up the database first
wp db export before-fix.sql --skip-plugins --skip-themes
# See what's active
wp plugin list --status=active --skip-plugins --skip-themes
# Deactivate one plugin
wp plugin deactivate old-slider --skip-plugins --skip-themes
# Or deactivate everything except the ones you trust
wp plugin deactivate --all --exclude=woocommerce --skip-plugins --skip-themes
The --all and --exclude options are documented on the wp plugin deactivate reference. Reactivate one plugin at a time with wp plugin activate name, then reload the site after each one.
What if the theme causes the critical error?
Switch to a default theme. If the error path points to wp-content/themes/, activate a bundled Twenty-series theme with WP-CLI, or rename the active theme’s folder so WordPress falls back to an installed default theme. A bad edit to functions.php is the most common theme cause.
- Back up the theme folder by downloading it.
- Check that at least one default theme exists in
wp-content/themes/, for exampletwentytwentyfive. - Run the commands below, or rename the active theme’s folder.
- Reload the site, fix the theme file, then switch back.
wp theme list --skip-plugins --skip-themes
wp theme activate twentytwentyfive --skip-plugins --skip-themes
Can a PHP version upgrade cause a critical error?
Yes. When your host moves you to a newer PHP version, old plugins that use removed functions or outdated syntax fail with a fatal error. The fix is to update or replace the plugin. If you need the site back right now, temporarily switch PHP back in your hosting panel.
Check Tools › Site Health › Info › Server for the PHP version once you’re back in. WordPress.org’s requirements page (last modified May 7, 2026) recommends PHP 8.3 or greater. Rolling PHP back is a stopgap. Older PHP branches stop getting security fixes, as php.net’s supported versions page shows, so plan to replace the plugin.
How do you fix “Allowed memory size exhausted”?
Raise the WordPress memory limit with WP_MEMORY_LIMIT in wp-config.php. According to WordPress.org’s Editing wp-config.php handbook page, WordPress tries to set 40MB by default, or 64MB on Multisite. A heavy page builder or WooCommerce store often needs more.
Back up wp-config.php, then add these lines above /* That's all, stop editing! */ in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // admin area only
WordPress can’t go past the server’s own PHP memory_limit. If the error persists, ask your host to raise it.
What if WordPress core files are corrupted?
Run wp core verify-checksums. It compares every core file against the official WordPress.org checksums and lists files that are modified or missing. A failed auto-update, a bad upload, or malware can all corrupt core. Reinstalling core files fixes it without touching your content.
wp core verify-checksums --skip-plugins --skip-themes
# Reinstall the same version's core files (wp-content and wp-config.php are not touched)
wp core download --version=$(wp core version --skip-plugins --skip-themes) --force --skip-content
We cover reading the output in detail in our guide to verifying WordPress core checksums with WP-CLI. If unknown files show up that you never added, treat it as a possible hack, not a simple error.
Symptom, cause, and fix at a glance
Match what happened right before the error to the most likely cause. Most critical errors follow a change: a plugin update, a PHP upgrade, a code edit, or a migration. This table maps each trigger to the first thing to check and the fastest fix.
| Symptom or trigger | Likely cause | Fix |
|---|---|---|
| Error right after updating a plugin | New version has a bug or conflict | Deactivate it, then roll back or wait for a patch |
| Error right after a PHP upgrade | Plugin or theme uses removed PHP features | Update or replace it. Revert PHP briefly if needed |
Error after editing functions.php | Syntax error | Restore the file from backup over FTP |
| Only wp-admin breaks | Admin-only plugin code or low admin memory | Check debug.log, raise WP_MAX_MEMORY_LIMIT |
| Only one page or checkout breaks | Shortcode, block, or payment plugin | Read debug.log while loading that page |
| “Allowed memory size exhausted” | Memory limit too low or heavy plugin | Raise WP_MEMORY_LIMIT |
| Error after a failed auto-update | Missing or partial core files | Run wp core verify-checksums, reinstall core |
| Error after migration | Different PHP version or missing PHP extension | Match PHP version and extensions to the old server |
| No email and no admin access | Mail failing or rate limit hit | Use debug.log and FTP or WP-CLI instead |
When should you restore a backup instead?
Restore a backup when you can’t identify the cause within about 30 minutes, when several things changed at once, or when core checksums show files you didn’t add. A clean restore from before the error is often faster than debugging. Just know you’ll lose any orders or posts created since that backup.
- Take a backup of the broken site first, so you can compare or recover recent data.
- Pick the most recent backup from before the error started.
- Restore files and database together, so plugin versions and database tables match.
- Don’t re-run the update that broke it until you’ve tested it on staging.
Not sure your backup actually works? Read how to test a WordPress backup before you restore it.
How do you prevent critical errors?
Test updates on a staging copy before production, update one plugin at a time, keep daily backups, and check plugin PHP compatibility before your host upgrades PHP. Most critical errors come from untested changes made directly on a live site.
- Use a staging site. Our guide to creating a WordPress staging site walks through it.
- Follow a routine to update WordPress plugins safely, one at a time, with the front end open in another tab.
- Set
RECOVERY_MODE_EMAILto an address you check. - Remove plugins that haven’t been updated in years. They are the first to break on new PHP versions.
- Edit theme code over SFTP with a backup copy, never only in the built-in theme file editor.
Frequently asked questions
Is the WordPress critical error the same as the white screen of death?
They come from the same thing, a PHP fatal error. Before WordPress 5.2 a fatal error usually showed a blank white page. Since 5.2, the fatal error handler catches it and shows the critical error message instead. You fix both the same way.
Why didn’t I get the recovery mode email?
WordPress sends it to the admin email address at most once per day by default. It may also fail if your server can’t send mail, the admin email is outdated, or WP_DISABLE_FATAL_ERROR_HANDLER is set. Use the debug log instead of waiting.
How do I change the recovery mode email address?
Add define( ‘RECOVERY_MODE_EMAIL’, ‘you@example.com’ ); to wp-config.php. WordPress uses this constant before the admin email. The constant name has no WP_ prefix. You can also change the admin email in Settings, General.
Will deactivating plugins delete my data?
No. Deactivating or renaming a plugin folder does not delete its settings or content. Data is only removed if you delete or uninstall the plugin and it has uninstall cleanup code. Avoid the –uninstall flag in WP-CLI while troubleshooting.
Can visitors see the error details?
Not by default. Visitors only see the generic critical error message. If you set WP_DEBUG_DISPLAY to true, errors print on screen for everyone, which can expose file paths. Log errors to debug.log instead and remove debug settings when finished.
Should I contact my host?
Contact your host if you can’t access files, the debug log stays empty, the error points to server limits like PHP memory_limit, or it started after a server-side PHP change. Send them the exact fatal error line from the log.



Leave a Reply