Seeing "There has been a critical error on this website" is alarming, especially when it replaces your whole site. Take a breath. This message is WordPress protecting you from a crash, and in most cases the cause is a single plugin, theme or PHP problem that can be found and fixed.

This guide walks you through the fix in the safest order: use the recovery email, read the error log, pause the broken plugin or theme, then deal with PHP and memory issues. You will need access to your admin email and, ideally, SFTP or your hosting file manager.

Six-step diagram for fixing a WordPress critical error: check email, read the log, pause the culprit, check theme and PHP, check memory, prevent
Start with the least invasive step and work down the list.

What Does 'There Has Been a Critical Error on This Website' Mean?

It means PHP hit a fatal error while loading your site, and WordPress caught it instead of showing a blank white screen. This behaviour arrived in WordPress 5.2 as part of the fatal error recovery mode feature.

The WordPress documentation on common errors lists the usual causes:

Usually the error started right after something changed: an update, a new plugin, a hosting change or a PHP upgrade. Write down what changed most recently. It is often the answer.

Before you change anything: if your host offers one-click backups, take one now, even of the broken site. It gives you a way back if a fix goes wrong.

Check Your Email for the Recovery Mode Link

When WordPress catches a fatal error, it emails the site's admin email address. The email says which plugin or theme caused the problem and includes a special link to recovery mode.

Concept illustration of a glowing envelope sending a beam of light to a website window that is lighting back up
The recovery email is the quickest way back into a broken site.
  1. Search your inbox and spam folder for an email from your site about a technical issue.
  2. Click the recovery mode link and log in as usual.
  3. WordPress shows a notice listing the paused plugins or themes and the error each one caused.
  4. Deactivate the culprit, or update it if an update is available.
  5. Exit recovery mode using the button in the admin bar and check the site.

According to the WordPress core team's announcement, recovery mode pauses the broken extension only for you, using a cookie in your browser. Visitors still see the error until you deactivate or fix the plugin.

No email? The admin address may be old or unmonitored, or your server may not send mail reliably. Move on to the next step.

How to Read the Error With WP_DEBUG_LOG

The error log tells you exactly what failed. The official WordPress debugging guide recommends adding these lines to wp-config.php, above the line that says /* That's all, stop editing! */:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Reload the broken page, then open wp-content/debug.log using SFTP or your host's file manager. Look for lines starting with PHP Fatal error.

Diagram explaining how to read a PHP fatal error line in debug.log: what failed, the file path that names the plugin, and what to do next
The path after plugins/ or themes/ usually tells you which extension is responsible.

The file path is the key clue. If it contains /wp-content/plugins/some-plugin/, that plugin is the likely cause. If it contains /wp-content/themes/, look at your theme.

Turn debugging off when you're done. WordPress says debug tools are not recommended on live sites. Keep WP_DEBUG_DISPLAY false so visitors never see errors, set WP_DEBUG back to false once fixed, and delete debug.log, which can reveal file paths.

Disabling a Broken Plugin Without Dashboard Access

If you cannot get into the dashboard, you can deactivate a plugin by renaming its folder. WordPress cannot find it, so it stops loading it.

Concept illustration of a row of glowing folders on a server rack with one red folder pulled out beside a wrench
Renaming one plugin folder switches that plugin off without deleting anything.
  1. Connect with SFTP or open your hosting file manager.
  2. Go to wp-content/plugins/.
  3. Rename the suspect plugin's folder, for example some-plugin to some-plugin-off.
  4. Reload the site. If it works, you have found the cause.
  5. Not sure which plugin? The WordPress documentation suggests renaming the whole plugins folder to plugins_old to deactivate everything, then renaming it back and re-enabling plugins one at a time from the dashboard.

Do not delete the plugin in a panic. Its settings and data may still matter. Once the site is back, update it, contact its developer with the error message, or replace it with a maintained alternative.

When the Theme or PHP Version Is the Cause

If the log points at your theme, rename the active theme's folder in wp-content/themes/. WordPress will fall back to a default theme if one is installed. Check that a default theme, such as Twenty Twenty-Five, is installed first.

PHP version changes are a common trigger. Hosts upgrade PHP, and older plugins or themes that use removed functions then fail. Signs include errors mentioning deprecated or undefined functions right after a hosting change.

If your host is moving you off PHP 8.2, my guide to PHP 8.2 end of life covers a staging-first upgrade.

Memory Limit and Hosting Errors

A log line containing Allowed memory size of ... bytes exhausted means PHP ran out of memory. The WordPress documentation suggests raising the limit in wp-config.php or php.ini:

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

This only works up to the limit your host allows. If it makes no difference, ask your host to raise it. Also ask why the site needs so much memory: a heavy plugin or a big import is often the real cause.

If the log is empty or the error looks unrelated to WordPress, the problem may be on the server: a full disk, a database issue or a failed update. My WordPress site down emergency checklist helps you separate hosting, DNS and database failures. For a completely blank page with no message, see how to fix the WordPress white screen of death.

How to Stop It Happening Again

Most critical errors are caused by changes, so the fix is to control how changes happen.

Checklist of eight ways to prevent WordPress critical errors, including backups, staging updates, supported PHP and uptime monitoring
A short list that prevents most repeat incidents.

Frequently Asked Questions

What causes 'There has been a critical error on this website'?

A PHP fatal error. WordPress's documentation lists plugin conflicts, theme compatibility issues, an incompatible PHP version, hitting the memory limit and corrupted WordPress files as the most common causes.

I didn't get the WordPress recovery mode email. What now?

Check spam and confirm which address is set as the site admin email. If no email arrived, enable WP_DEBUG_LOG to find the error in wp-content/debug.log, then rename the broken plugin's folder over SFTP.

Will renaming a plugin folder delete its settings?

No. Renaming the folder just stops WordPress loading the plugin. Its settings usually stay in the database, and renaming it back restores it, although you should fix the cause first.

Is it safe to leave WP_DEBUG on?

No. WordPress recommends debug tools for local and staging sites, not live ones. Turn WP_DEBUG off after fixing the error, keep error display off, and delete the debug.log file.

Can a hacked site show a critical error?

Yes, sometimes malicious or broken injected code causes fatal errors. If you see unfamiliar files or plugins in the error log, treat it as a possible compromise and investigate before simply reactivating everything.

Final Thoughts

"There has been a critical error on this website" sounds dramatic, but it is usually a single plugin, theme, PHP or memory problem. Use the recovery email if you have it, read the log, switch off the culprit, then fix the underlying cause.

If your site is down right now and you'd rather hand it over, my site down service is built for exactly this situation.

Back up first, read the log, and change one thing at a time.

Official References

Sources checked on 29 October 2026: