“There Has Been a Critical Error on This Website” – How to Fix It

Fix: There Has Been a Critical Error on This Website

Quick answer: This message means a PHP fatal error stopped WordPress from loading — usually caused by a plugin, a theme, a PHP version mismatch or low memory. First, check your admin email for a recovery mode link from WordPress. If there’s no email, turn on debug logging to see the exact error, then deactivate the plugin or theme named in the error (by renaming its folder via FTP or File Manager).

Since WordPress 5.2, instead of a blank white screen you see: “There has been a critical error on this website. Please check your site admin email inbox for instructions.” Your content is safe — this is a code error, not data loss. Work through the fixes below in order.

What causes the critical error?

CauseHow commonTypical trigger
Plugin conflict or bugVery commonJust updated or installed a plugin
Theme errorCommonTheme update or edited functions.php
PHP version incompatibilityCommonHost upgraded PHP
PHP memory limit reachedOccasionalHeavy plugins or large imports
Corrupted core filesRareFailed update or hack

Fix 1: Use the recovery mode email

WordPress emails the site’s admin address with the subject “Your Site is Experiencing a Technical Issue”. The email names the plugin or theme that failed and includes a special recovery mode login link.

  1. Open the email and click the recovery link.
  2. Log in. WordPress pauses the faulty plugin or theme.
  3. Go to Plugins, deactivate the problem plugin, then click Exit Recovery Mode.

No email? Check spam, or your site may not be sending email at all (a common issue on cheap hosting). Move on to the next fix.

Fix 2: Turn on debug logging to find the cause

Open wp-config.php in your site’s root folder (via FTP or your host’s File Manager) and add these lines above “That’s all, stop editing!”:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Reload your site, then open /wp-content/debug.log. Look for a line starting with “PHP Fatal error”. It shows the file path — for example /wp-content/plugins/plugin-name/ — which tells you exactly what broke. Full details are in our WordPress debug mode guide and the official debugging handbook. Turn debugging off when you’re done.

Fix 3: Deactivate the faulty plugin

  1. Connect by FTP or File Manager.
  2. Go to /wp-content/plugins/.
  3. Rename the folder of the plugin named in the error (for example add “-off” to the end).
  4. Reload your site.

Don’t know which plugin? Rename the whole plugins folder to plugins-off. If the site loads, rename it back and reactivate plugins one by one in the dashboard until the error returns. Our plugin troubleshooting guide explains this conflict test step by step.

Fix 4: Switch to a default theme

If the error points to your theme, rename its folder in /wp-content/themes/. WordPress will fall back to a default theme like Twenty Twenty-Five (make sure one is installed). If you edited functions.php recently, undo that change. Next time, use a child theme or a snippets plugin.

Fix 5: Check your PHP version

Old plugins can break on new PHP versions, and new plugins can break on very old ones. In your hosting panel, find the PHP version setting. If the host upgraded recently, try the previous version temporarily, then update or replace the outdated plugin. WordPress lists its recommended PHP version.

Fix 6: Increase the PHP memory limit

If the log says “Allowed memory size exhausted”, add this to wp-config.php:

define( 'WP_MEMORY_LIMIT', '256M' );

If that doesn’t help, ask your host to raise the server’s memory limit.

Fix 7: Restore a backup or reinstall core

If nothing else works, restore a recent backup from your host or backup plugin (see our backup guide). You can also replace the wp-admin and wp-includes folders with fresh copies from the official download — see where to download WordPress safely. Never overwrite wp-content or wp-config.php.

How to prevent critical errors

  • Test updates on a staging site first.
  • Update plugins one at a time on important sites.
  • Keep daily backups.
  • Remove plugins you don’t use.
  • Use hosting with a modern, supported PHP version.

Real examples of what the debug log tells you

The debug log can look technical, but you only need to read one line. Here are three common examples and what they mean:

  • “PHP Fatal error: Uncaught Error: Call to undefined function … in /wp-content/plugins/example-plugin/…” — the plugin named in the path is broken or needs a newer WordPress or PHP version. Deactivate it.
  • “Allowed memory size of 134217728 bytes exhausted” — PHP ran out of memory (128 MB here). Increase the memory limit and look for a heavy plugin.
  • “syntax error, unexpected … in /wp-content/themes/your-theme/functions.php” — a code edit in the theme has a typo. Undo the last change.

The folder name after /plugins/ or /themes/ is the culprit in almost every case.

When the error appears after a PHP update

Hosts regularly upgrade PHP, and sometimes do it urgently for security reasons — for example after the October 2026 PHP2Shell vulnerabilities. If the critical error appeared right after a PHP change, don’t roll back to an unsupported, unpatched version. Instead, find the outdated plugin or theme in the log, update or replace it, and ask your host for a supported PHP version that still works while you fix it.

Ask your host for help

Your host can see server error logs even when WordPress can’t load. Send them the time the error started, the URL and any recent changes. Good hosts can usually point to the failing file within minutes, and many will restore a backup for you.

A five-minute triage routine

When the critical error appears, work in this order and stop as soon as the site loads. First, check the admin inbox for the recovery email. Second, think about what changed in the last 24 hours — an update, a new plugin, a code snippet or a host change — and undo that one thing. Third, turn on the debug log and read the last fatal error line. Fourth, rename the plugin or theme folder named in that line. Finally, if nothing works, restore last night’s backup and investigate on a staging copy. Following the same order every time keeps you calm and stops you making extra changes that complicate the fix. Write down what you changed as you go, so you can reverse it if needed and share the details with your host or developer.

Related errors

If you see a blank page instead, read our white screen of death fix. If the message says “Error establishing a database connection”, follow our database connection guide.

FAQ

Did I lose my content?

No. Posts, pages and media are in the database and files; the error only stops the site from displaying.

Can I fix it without FTP?

Yes — use the recovery email, or your host’s File Manager in the control panel.

Why does the error only show on some pages?

The faulty code may only run on certain pages, like checkout or a page using a specific block or shortcode.

WordPressPrime.com is an independent guide and is not affiliated with the WordPress Foundation, WordPress.org or Automattic. Always back up your website before making changes, and check official sources for the latest details.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *