# Fixing "There has been a critical error on this website" in WordPress

> WordPress shows "There has been a critical error on this website". Here's how to find the plugin, theme or PHP problem behind it and get your site back.

Source: https://helpcenter.ruachost.com/getting-started/website-troubleshooting/fixing-the-wordpress-critical-error/

WordPress shows **"There has been a critical error on this website"** when a PHP error stops a page from loading. It's almost always caused by a plugin, a theme, or a change of PHP version.

## 1. Check your email

WordPress usually emails the site's admin address with the subject **"Your Site is Experiencing a Technical Issue"**. The email names the plugin or theme that caused the error, and includes a **recovery mode** link.

1. Click the recovery mode link and log in.
2. WordPress shows which plugin or theme failed. Deactivate it, or update it if an update is available.
3. Click **Exit Recovery Mode**.

No email? Check your spam folder, then carry on below.

## 2. Find the error in the log

Open the `error_log` file in your website's folder in cPanel's **File Manager**, or turn on WordPress debug logging. See [Finding PHP error logs](https://helpcenter.ruachost.com/developers/php/enabling-php-error-logging/).

Look for the last **PHP Fatal error** line. The file path tells you the cause:

- `wp-content/plugins/plugin-name/...`: that plugin
- `wp-content/themes/theme-name/...`: that theme
- `Call to undefined function`: a PHP extension is turned off. See [Common PHP errors](https://helpcenter.ruachost.com/developers/php/common-php-errors/).
- `Allowed memory size exhausted`: see [PHP memory limit vs your plan's RAM](https://helpcenter.ruachost.com/developers/php/resolving-the-allowed-memory-size-exhausted-php-error-message/).

## 3. Turn off the plugin or theme without logging in

In File Manager:

- **One plugin:** go to `wp-content/plugins/` and rename the plugin's folder, for example `elementor` to `elementor-off`.
- **All plugins:** rename `wp-content/plugins` to `plugins-off`. If the site comes back, rename it to `plugins` again, log in, and reactivate plugins one at a time to find the faulty one.
- **Theme:** rename your theme's folder in `wp-content/themes/`. WordPress switches to a default theme such as Twenty Twenty-Five, if one is installed.

You can also turn plugins and themes on and off in cPanel's **WordPress Management** (WP Toolkit).

## 4. Did you change PHP version?

If the error started after changing PHP version, switch back in cPanel under **Select PHP Version**, then update WordPress, your plugins and your theme before trying again.

## 5. Restore yesterday's backup

If nothing works, restore your website's files and database from before the error. See [Restoring files, email and databases using JetBackup](https://helpcenter.ruachost.com/cpanel/files/restoring-files-email-and-databases-using-jetbackup/).

## Related articles

- [Troubleshooting WordPress issues](https://helpcenter.ruachost.com/wordpress/guides/troubleshooting-wordpress-issues/)
- [Troubleshooting blank pages in WordPress](https://helpcenter.ruachost.com/wordpress/guides/troubleshooting-blank-pages-in-wordpress/)
