"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.

On this page
- 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
Step 1: Check your email for the recovery mode link
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
- Open your hosting file manager or connect by SFTP
- Go to wp-content and rename the
pluginsfolder to something likeplugins-off. This deactivates all plugins - 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
- 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
- Test updates on a staging site first; see staging sites explained
- Update in a sensible order and one at a time; see updating WordPress safely
- Keep automatic backups
- Avoid editing theme files directly in the dashboard
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.


