WordPress Errors

How to Fix the WordPress Critical Error Message

By ErrorNest Published Updated 4 min read
The WordPress critical error is usually a plugin or theme problem. Use the recovery email, read the debug log, then deactivate plugins and themes to find the cause.
Programming code on a computer monitor
On this page

The message “There has been a critical error on this website” means WordPress hit a PHP error it could not recover from. In most cases the cause is a plugin or theme that was just installed, updated or is incompatible with your PHP version. The fix is to find that component and switch it off. Work in this order, and take a backup before you change files.

Quick fix: Check the email inbox of the site’s admin address for a message about a technical issue. It contains a recovery mode link that lets you log in and deactivate the plugin or theme that caused the error.

What causes the critical error

  • A plugin or theme update that conflicts with another plugin, WordPress or PHP.
  • A recently edited functions.php file or code snippet with a mistake in it.
  • A PHP version that is too old or too new for a plugin or theme.
  • PHP running out of memory.
  • A damaged or incomplete WordPress update.
Green characters of code on a dark screen

1. Use the recovery mode email

WordPress usually emails the administrator address with the subject “Your Site is Experiencing a Technical Issue”. It names the plugin or theme involved and includes a recovery mode link. Open the link, log in, and deactivate the component it names. Check your spam folder if you cannot find the email.

2. Back up first

Before changing anything, make a copy of your site files and database, using your hosting control panel or a backup tool. If you have an automatic backup from before the problem began, note its date.

3. Turn on the error log

To see exactly what failed, open wp-config.php using your host’s File Manager or FTP, 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 page, then open wp-content/debug.log. The last lines normally show a file path such as wp-content/plugins/plugin-name/..., which tells you which plugin or theme crashed.

Important: Turn debugging off again when you are done by removing those lines or setting WP_DEBUG to false, and delete debug.log if it contains anything sensitive.

4. Deactivate all plugins

If you cannot log in to WordPress, use File Manager or FTP to rename the wp-content/plugins folder to plugins-off. Reload your site. If it loads, a plugin was the cause. Rename the folder back to plugins, then deactivate plugins one at a time from the dashboard, or rename single plugin folders, until the error returns.

5. Switch to a default theme

If plugins are not the cause, rename the active theme’s folder inside wp-content/themes. WordPress then falls back to a default theme, as long as one such as Twenty Twenty-Five is installed. If your site loads, the theme is the cause. Restore the folder name and update or replace the theme, or remove the recent edit you made to it.

6. Check the PHP version

In your hosting control panel, find the PHP version setting. If the problem started after a PHP change, switch back one version and test. If the plugin or theme is old, check its page on wordpress.org to see which PHP versions it supports.

7. Check for memory errors

If debug.log mentions “Allowed memory size exhausted”, follow our guide to fixing the PHP allowed memory size error.

8. Restore a backup or reinstall core files

If none of that works, restore the most recent backup from before the problem. As a final option, download a fresh copy of WordPress from wordpress.org and replace only the wp-admin and wp-includes folders. Do not replace wp-content or wp-config.php, because they hold your content and settings.

Frequently asked questions

Will I lose my content?

Posts and pages live in the database and the uploads folder, which these steps do not delete. Deactivating a plugin keeps its data, but removing it can delete its settings.

Why can I not log in to the dashboard?

The critical error can block the dashboard too. Use the recovery mode link, or rename the plugins folder as in step 4.

Can I fix it without FTP?

Yes. Most hosts offer a File Manager in their control panel, which does the same renaming and editing.

When to contact support

If the log points to a plugin or theme you cannot replace, contact its developer with the exact line from debug.log. If you cannot reach your files or the server itself is returning errors, contact your hosting provider. The official WordPress support forums are also a good place to ask.

Official resources