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 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.
- Open
https://yourdomain.com/wp-login.php. If it shows the error, WordPress tries to send the email. - 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. It stops working after about a day.
- 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 (it’s listed under Paused).
- For a theme, go to Appearance → Themes and activate a default theme, such as Twenty Twenty-Five.
- 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.
- 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.
- 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 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. - Back in File Manager, rename
plugins.holdback toplugins. Your plugins stay off. - 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 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
- In File Manager, open
wp-content/themes. Check that a folder starting withtwentytwenty(such astwentytwentyfive) is 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. 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.
- Select
wp-config.phpin your site’s folder and choose Edit from File Manager’s More menu. - Delete every line that starts with
define( 'WP_DEBUG. Usually there’s one:define( 'WP_DEBUG', false ); - 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.
- Open
wp-content, selectdebug.logand 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. - Right away, edit
wp-config.phpagain, changetruetofalseon theWP_DEBUGline, and save. - 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.