There Has Been a Critical Error on This Website”: Causes and Fixes

ThemeZone

WordPress & Website Building

“There Has Been a Critical Error on This Website”: Causes and Fixes

Your WordPress site shows a single line of text instead of your pages. Here is how to find the plugin, theme or setting behind it, with a step-by-step troubleshooter that picks the right fix for your situation.

Author: [AUTHOR NAME]
Published: [PUBLISHED DATE]
Last updated: [UPDATED DATE]
Reading time: about 7 minutes
Quick answer

The message means a PHP error stopped WordPress from loading. Your content is almost always still safe. The cause is usually a plugin, a theme, a PHP version change or a code edit. Fastest fix: use the recovery mode link WordPress emails to the admin address, or deactivate the plugin or theme you changed last. Back up before editing files.

What the message actually means

“There has been a critical error on this website” is what WordPress shows when a PHP error stops a page from loading. Your posts, pages and images are almost certainly still safe in the database. Something in the code that runs the site, usually a plugin or theme, has failed.

The most common causes are a plugin or theme conflict, a code edit with a typo, a PHP version that an older plugin does not support, and a site running out of memory. The fix is to find which one, not to reinstall everything.

Before you touch anything

Do not delete anything yet. If you can reach your files, copy them somewhere safe first. Our guide to backing up a WordPress site covers the options. Also write down what you changed just before the error: a plugin update, a theme edit, a new plugin. That one fact usually solves the problem.

If the odd behavior is redirects to strange pages or unknown admin users, that is a different problem. Use our WordPress hacked recovery plan instead.

Free tool: critical error troubleshooter

Answer a few questions and get the fix steps that match your situation. This is a fixed decision tree written for this article. It does not use AI and it does not look at your website.



Recovery mode: the fastest route

Since WordPress 5.2, the site sends an email to the administrator address when it detects a fatal error. It contains a time-limited link that opens recovery mode. In recovery mode WordPress pauses the failing plugin or theme for your session and tells you which one it is.

  1. Search the admin mailbox, including spam, for the email about a technical issue on your site.
  2. Click the link and log in.
  3. Deactivate or replace the plugin or theme that WordPress names.
  4. Choose Exit Recovery Mode and reload the site in a private window.

REPLACE-WITH-DESCRIPTIVE-ALT-TEXT
The recovery mode email and where its link leads, with the plugin warning screen.

Read the debug log to find the culprit

If you can edit files but there is no email, turn on WordPress’s error log. Open wp-config.php and add these lines above the comment that says to stop editing:

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

Reload the broken page once, then open wp-content/debug.log. Look for the last line that contains Fatal error. The file path in that line tells you who is responsible. When you are done, remove those three lines or set WP_DEBUG back to false, because a log file left behind should not stay on a live site.

What the log shows Likely cause First fix
A path containing /wp-content/plugins/plugin-name/ That plugin has an error or conflicts with something else. Rename or deactivate that plugin.
A path containing /wp-content/themes/theme-name/ Theme code or your own edit to functions.php has an error. Switch to a default theme or undo the edit.
Allowed memory size exhausted A page needed more memory than PHP allows. Ask the host to raise the memory limit, then find the heavy plugin.
Call to undefined function or a syntax error after a PHP change Code is not compatible with the PHP version now in use. Return to the previous PHP version, then update the code.
Failed opening required A file is missing, often after an interrupted update. Re-upload the plugin or theme files, or restore from backup.

REPLACE-WITH-DESCRIPTIVE-ALT-TEXT
A sample debug log line with the plugin folder name highlighted.

Common mistakes

  • Reinstalling WordPress first. The problem is almost never core files, and a reinstall is slower than finding the one bad plugin.
  • Deleting plugins to “clean up”. Renaming a folder is reversible. Deleting is not.
  • Changing several things at once. Change one thing, reload, and note the result.
  • Leaving debug mode on. Turn it off when the problem is solved.
  • Skipping the backup. Take one before editing files, even when you are in a hurry.

Troubleshooting the fix itself

I renamed the plugins folder and the site still fails

Rename it back, then try renaming the active theme’s folder. If both fail, the debug log should now name a different cause. Share it with your host.

After renaming the folder back, all my plugins are inactive

That is normal. WordPress deactivates plugins it cannot find. Reactivate them one at a time and reload the site after each, so the one that triggers the error is obvious.

There is no debug.log file

WordPress only creates it when an error is written. Check that the lines are above the stop-editing comment, reload the failing page, and confirm the wp-content folder is writable.

How do I stop this happening again?

Update plugins one at a time rather than in bulk, keep a recent backup, remove plugins you no longer use, and choose hosting that lets you pick and update the PHP version. Our guide to choosing WordPress hosting compares the options.

FAQ

Is my content lost when I see this error?

In most cases, no. Posts and pages live in the database, and the error comes from code that runs on top of it.

Which email address gets the recovery link?

The administrator email set under Settings → General. If you no longer have access to that mailbox, use the file-based steps in the tool above.

Can a theme update cause this?

Yes. A theme update or a code edit to its files can trigger a fatal error. Switching to a default theme is the quickest test.

When should I ask my host for help?

If renaming plugins and the theme changes nothing, or you cannot reach your files at all, send your host the exact error, the time it started and what you changed last.

Does this tool fix my site?

No. It points you to the right manual steps. It does not connect to your website.

Your next step

If your site is down now, run the troubleshooter above and follow the steps in order. If it is healthy, take a backup today and read our guide to choosing and installing plugins safely so the next update is less risky.

Related reading

Back to top

Leave a Reply

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