Fixing "There has been a critical error on this website" in WordPress
Ce contenu n’est pas encore disponible dans votre langue.
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
Section titled “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.
- Click the recovery mode link and log in.
- WordPress shows which plugin or theme failed. Deactivate it, or update it if an update is available.
- Click Exit Recovery Mode.
No email? Check your spam folder, then carry on below.
2. Find the error in the log
Section titled “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.
Look for the last PHP Fatal error line. The file path tells you the cause:
wp-content/plugins/plugin-name/...: that pluginwp-content/themes/theme-name/...: that themeCall to undefined function: a PHP extension is turned off. See Common PHP errors.Allowed memory size exhausted: see PHP memory limit vs your plan’s RAM.
3. Turn off the plugin or theme without logging in
Section titled “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 exampleelementortoelementor-off. - All plugins: rename
wp-content/pluginstoplugins-off. If the site comes back, rename it topluginsagain, 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?
Section titled “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
Section titled “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.
Related articles
Section titled “Related articles”Cette page vous a-t-elle aidé ?
Merci pour votre retour.