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.
Applies to: cPanel WordPress Blue Arctic Shared Web Hosting (cPanel) and Managed WordPress Hosting; WordPress 7.x
On this page
“There has been a critical error on this website” means an error in your site’s code stopped WordPress from loading. The cause is almost always a plugin, a theme, or added code. Your posts and pages are still there.
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.
- Open
https://yourdomain.com/wp-login.php. If it shows the error, WordPress tries to send the email. - If the login form loads instead, log in. If the dashboard opens, skip the email: use step 6 or step 7 on the plugin or theme you added or updated last.
- 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.
- Click the link in the email.
- The login page shows “Recovery Mode Initialized. Please log in to continue.” Log in.
- For a plugin, go to Plugins and click Deactivate under it (in Recovery Mode it’s listed under Paused).
- For a theme, go to Appearance → Themes and activate a default theme, such as Twenty Twenty-Five.
- If you used the email link, click Exit Recovery Mode in the top toolbar.
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.
Warning
Rename folders only; never delete them.
- In cPanel, click Files in the sidebar and open the File Manager tab (see how to use File Manager). If you see a File Manager icon instead, click it. If you can’t find it, open a support ticket.
- Open your site’s folder (usually
public_html), thenwp-content. - Select the
pluginsfolder, choose Rename from the More (⋮) menu, and rename it toplugins.hold. - Reload your site. If it still shows the error, rename
plugins.holdback topluginsand go to Option 3. - If the critical error is gone, log in at
https://yourdomain.com/wp-admin/plugins.php. WordPress shows that each plugin “has been deactivated due to an error”. - Back in File Manager, rename
plugins.holdback toplugins. - In WordPress, go to Plugins and activate them one at a time. Reload your site after each one. When the error comes back, deactivate the one you just turned on.
Option 3: Rule out the theme
- In File Manager, open
wp-content/themes. Check that a folder starting withtwentytwentyis there. If not, stop and open a support ticket. - 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. - Rename that folder by adding
-offto the end. Don’t rename anytwentytwentyfolder. - Log in at
https://yourdomain.com/wp-adminand go to Appearance → Themes. WordPress shows “The active theme is broken. Reverting to the default theme.” - Reload your site. If it works, your theme was the problem. Leave the folder renamed: activating the same files again brings the error back.
Option 4: Turn on the debug log
Warning
wp-config.php runs your whole site, so save a copy first (step 1). While the log is on, anyone could read it, so do all these steps in one sitting.
- In your site’s folder, select
wp-config.phpand click Download to save a copy on your computer. - With the file still selected, choose Edit from the More menu.
- Delete every line that starts with
defineand hasWP_DEBUGinside its brackets. Usually there’s one, such asdefine( 'WP_DEBUG', false );(it may have no spaces). Leave every other line alone. - 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 );
- Save the file and reload your site once. If you see a blank page or a new error, put your copy back: click Upload, select Overwrite existing files and choose the copy from step 1 (still named
wp-config.php). Then open a support ticket. - Open
wp-content, selectdebug.logand choose Edit from the More menu to read it. Find the last line with “PHP Fatal error”. The folder after/plugins/or/themes/in it names the plugin or theme. Copy that line, then close the file without saving. - Right away, edit
wp-config.phpagain. On the first two lines you added, changetruetofalse, and save. - Select
debug.logand click Delete. - Now switch off the plugin or theme that line named. For a plugin, add
-offto its folder name inwp-content/pluginsand open Plugins in WordPress once. For a theme, follow Option 3.
How to tell it worked
Your site loads normally in a private browser window, 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: WordPress sends it only once a day, and only when a plugin or theme caused the error. Or your site can’t send email. Use Option 2.
- No
debug.logappears: reload the page that shows the error, then File Manager. Still missing? Do Option 4 step 7, then open a support ticket. - 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. 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.