Maintenance

"There Has Been a Critical Error on This Website": How to Fix It Step by Step

What the WordPress critical error means, common causes (plugin or theme updates, PHP version, memory limits, code edits), how to use recovery mode, find the culprit via SFTP or file manager, and get the site back.

"There Has Been a Critical Error on This Website": How to Fix It Step by Step
On this page
  1. Common causes
  2. Step 1: Check your email for the recovery mode link
  3. Step 2: No email? Find the culprit through the files
  4. Step 3: Read the error details
  5. Step 4: Fix the cause
  6. Step 5: Restore a backup if needed
  7. Prevent it next time
  8. Need it fixed now?
Key takeaways
  • The critical error is a PHP fatal error; your content is almost always safe.
  • Use the recovery mode email link, or rename plugin and theme folders to find the culprit.
  • Read the error log, fix the plugin, PHP or memory cause, and test updates on staging.

"There has been a critical error on this website" is one of the most common WordPress problems I fix. It looks alarming, but your content is almost always safe. It means PHP hit a fatal error, and WordPress stopped loading the page to avoid showing a broken one.

Common causes

  • A plugin or theme update that conflicts with another plugin or your PHP version
  • A PHP version change by you or your host that old code doesn't support
  • Memory limit exhausted by heavy plugins or large imports
  • A code edit in functions.php or a snippets plugin with a mistake
  • An incomplete update interrupted halfway
  • Occasionally, malware corrupting files

WordPress usually emails the site's admin address with details of the error, including which plugin or theme caused it, and a special recovery mode link. Open the link, log in and deactivate the plugin or switch the theme named in the email.

Step 2: No email? Find the culprit through the files

  1. Open your hosting file manager or connect by SFTP
  2. Go to wp-content and rename the plugins folder to something like plugins-off. This deactivates all plugins
  3. If the site loads, rename it back, then deactivate plugins one at a time (by renaming each plugin's folder) until you find the one causing the error
  4. If plugins aren't the cause, rename your active theme's folder so WordPress falls back to a default theme

Step 3: Read the error details

  • Your hosting control panel's error log usually shows the exact file and line
  • Or enable WordPress debug logging temporarily to write errors to a private log file, and turn it off afterwards

An error mentioning "Allowed memory size exhausted" points to memory limits; one naming a plugin file points to that plugin.

For memory errors in detail, see how to fix "Allowed memory size exhausted" errors.

Step 4: Fix the cause

  • Plugin or theme conflict: update it, roll back to the previous version, or replace it
  • PHP version: switch back temporarily in the hosting panel, then update the incompatible code; see updating PHP safely
  • Memory: increase the PHP memory limit through your host, and look for the heavy plugin causing it
  • Code edit: undo the change in the file you edited

Step 5: Restore a backup if needed

If you can't find the cause quickly and the site needs to be online, restore the most recent working backup, then investigate on a staging copy; see backup and restore.

Prevent it next time

Need it fixed now?

I fix critical errors and broken WordPress sites quickly, usually the same day. See WordPress maintenance and support, or read about other common WordPress errors.

Need help with your website?

I'm Sameer, a freelance WordPress developer building fast, SEO-friendly websites since 2020. Tell me what you need and I'll reply with a plan and a fixed quote within 24 hours.

Found this useful? Share it:
Contact

Let's build your next website

Available for freelance projects, agency white-label work and long-term maintenance. Feel free to pass this along to your team or company.

Your details are emailed to me, then WhatsApp opens so we can chat right away.

Chat now