Browse help topics

Troubleshooting

WordPress Says “There Has Been a Critical Error on This Website”

A plugin, theme or code change crashed WordPress. Use the Recovery Mode link WordPress emails to your site's admin address to switch off the faulty item. If no email arrives, rename the plugins folder in cPanel's File Manager (Files, then the File Manager tab), then open the Plugins screen to switch them off.

  • Updated
  • Last reviewed
  • Intermediate
  • About 20 minutes

Applies to: cPanel WordPress Blue Arctic Shared Web Hosting (cPanel) and Managed WordPress Hosting; WordPress 7.x

On this page
  1. Option 1: Use the Recovery Mode email
  2. Option 2: Switch off plugins with File Manager
  3. Option 3: Rule out the theme
  4. Option 4: Turn on the debug log
  5. How to tell it worked
  6. Troubleshooting
  7. Still need help?

“There has been a critical error on this website” means a PHP error stopped WordPress from loading. PHP is the programming language WordPress runs on. The cause is almost always a plugin, a theme, or added code. Your posts and pages are still there.

Tip

If the error started right after an update or a new plugin, undoing that change is often the fastest fix.

Option 1: Use the Recovery Mode email

When a plugin or theme breaks your login page or dashboard, WordPress emails a special login link to your site’s administration email address.

  1. Open https://yourdomain.com/wp-login.php. If it shows the error, WordPress tries to send the email.
  2. Check that inbox, including spam, for a message whose subject ends “Your Site is Experiencing a Technical Issue”. It names the plugin or theme that failed.
  3. Click the link in the email. It stops working after about a day.
  4. The login page shows “Recovery Mode Initialized. Please log in to continue.” Log in.
  5. For a plugin, go to Plugins and click Deactivate under it (it’s listed under Paused).
  6. For a theme, go to Appearance → Themes and activate a default theme, such as Twenty Twenty-Five.
  7. Click Exit Recovery Mode in the toolbar at the top of the screen.

Note

Options 2 to 4 need cPanel. On Managed WordPress Hosting, use Option 1 or open a support ticket.

Option 2: Switch off plugins with File Manager

Use this if no email arrives. Renaming the plugins folder stops every plugin from loading without deleting anything.

Warning

Rename folders only; never delete them. Write down each name you change.

  1. In cPanel, open the File Manager tab under Files (see how to use File Manager). If you can’t find it, open a support ticket.
  2. Open your site’s folder (usually public_html), then wp-content.
  3. Select the plugins folder, choose Rename from the More menu, and rename it to plugins.hold.
  4. Reload your site. If it still shows the error, rename plugins.hold back to plugins and go to Option 3.
  5. If your site works, log in at https://yourdomain.com/wp-admin/plugins.php. WordPress shows that each plugin “has been deactivated due to an error”. Opening this screen is what switches them off.
  6. Back in File Manager, rename plugins.hold back to plugins. Your plugins stay off.
  7. In WordPress, go to Plugins and activate them one at a time. Reload your site after each one.
  8. When the error comes back, deactivate the plugin you just turned on.

Tip

To switch off one plugin when you can’t log in, rename its folder inside wp-content/plugins (add -off), then open Plugins in WordPress once.

Option 3: Rule out the theme

  1. In File Manager, open wp-content/themes. Check that a folder starting with twentytwenty (such as twentytwentyfive) is there. If not, stop and open a support ticket.
  2. Find your active theme’s folder. It’s usually the one whose name doesn’t start with twentytwenty. If you’re not sure which one, open a support ticket.
  3. Rename that folder by adding -off to the end. Don’t rename any twentytwenty folder.
  4. Log in at https://yourdomain.com/wp-admin and go to Appearance → Themes. WordPress shows “The active theme is broken. Reverting to the default theme.”
  5. Reload your site. If it works, your theme was the problem. Once its developer sends a fix, rename the folder back and activate the theme again.

Option 4: Turn on the debug log

Warning

wp-config.php holds your database password and runs your whole site. Before you edit it, select it and click Download to save a copy. While the log is on, anyone could read it, so do all these steps in one sitting.

  1. Select wp-config.php in your site’s folder and choose Edit from File Manager’s More menu.
  2. Delete every line that starts with define( 'WP_DEBUG. Usually there’s one: define( 'WP_DEBUG', false );
  3. Just above the line that starts /* That's all, stop editing!, add:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  4. Save the file and reload your site once.
  5. Open wp-content, select debug.log and choose Open from the More menu. Find the last line with “PHP Fatal error”. The folder after /plugins/ or /themes/ in it names the plugin or theme. Copy that line.
  6. Right away, edit wp-config.php again, change true to false on the WP_DEBUG line, and save.
  7. Select debug.log, click Download if you want a copy (Delete is permanent), then click Delete.

How to tell it worked

Your site loads normally in a private browser window (Incognito in Chrome), and you can log in at /wp-admin without the error. Keep the faulty item off until its developer releases a fix, or replace it.

Troubleshooting

  • No Recovery Mode email arrives: check spam. WordPress sends it only once a day, and only when a plugin or theme caused the error. Your site may also be unable to send email. Use Option 2.
  • The error started right after a PHP version change: switch back to your previous version (see how to change your PHP version).
  • Nothing worked: a backup from before the error can bring the site back. See how to restore a backup.

Still need help?

Open a support ticket from the Client Portal at my.bluearctic.com (see our support page). Include your domain, when the error started, what changed just before it, and the error line from debug.log if you have it. Never include your password.

Was this article helpful?

Report outdated instructions or suggest an improvement
Type of report

Please do not include passwords or personal information.

Still need help?

Our support team can look into your account and walk you through it.