How to Fix the 'There Has Been a Critical Error on This Website' Message
Content
Encountering the "There has been a critical error on this website" message can be alarming, especially when it appears after a routine update or when trying to access your WordPress dashboard. This guide will walk you through the common causes of this error and provide step-by-step solutions to get your site back online.
What Causes This Critical Error?
This generic error message is WordPress's way of hiding sensitive technical details from website visitors. It's typically triggered by a PHP error that is severe enough to halt the execution of a script. Based on community reports, the most frequent triggers include:
- Plugin or Theme Conflicts: A plugin or theme may not be compatible with your current version of WordPress or PHP.
- PHP Version Incompatibility: Code that worked on older PHP versions (like 7.4) can sometimes fail on newer ones (like 8.2 or 8.3), leading to fatal errors.
- Failed Core Updates: An incomplete or corrupted update of WordPress itself can cause the admin dashboard to become inaccessible.
- Server Configuration Issues: Changes in server settings or resource limits can also be a culprit.
Step-by-Step Troubleshooting Guide
Step 1: Enable Debug Mode to Find the Root Cause
The first step is to uncover the specific error behind the generic message. You can do this by enabling WordPress debugging.
- Access your website's files via an FTP client or your web host's file manager.
- Navigate to the root directory and locate the
wp-config.phpfile. - Edit this file and look for the line that says
define('WP_DEBUG', false);. - Replace that line with the following code:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); - Save the file and refresh the page where you see the error. This will create a
debug.logfile in your/wp-content/directory containing the detailed error message.
Step 2: Isolate the Problem (The Most Common Fix)
Often, the error is caused by a plugin or theme. If you cannot access the dashboard to disable them, you can do it manually.
- Via your FTP client or file manager, navigate to the
/wp-content/folder. - Rename the 'plugins' folder to something like '
plugins.deactivate'. This will deactivate all plugins at once. - Now check your website. If the error is gone, you know a plugin was the cause. You can then rename the folder back to '
plugins' and reactivate them one by one in the dashboard to identify the problematic one. - If the error persists, the issue might be your theme. Navigate to
/wp-content/themes/and temporarily rename your active theme's folder. WordPress will automatically fall back to a default theme (like Twenty Twenty-Four). If this fixes the error, you'll need to contact your theme's support or find a compatible version.
Step 3: Check for PHP Version Compatibility
As seen in the sample threads, code that runs on PHP 7.4 can fail on PHP 8.2+. If your debug log points to a specific file or function, it may need to be updated for PHP 8+ compatibility.
- Contact your web host to check your current PHP version. You may be able to temporarily switch back to an older, supported PHP version (like 7.4) through your hosting control panel to confirm this is the issue.
- If a specific plugin or theme is causing the error, check with its developer for an update that supports newer PHP versions.
Step 4: Manually Reinstall WordPress Core Files
If you suspect the WordPress update itself failed, you can perform a manual reinstall without affecting your content, themes, or plugins.
- Download a fresh copy of WordPress from wordpress.org.
- Unzip the file on your computer.
- Using FTP, delete the
wp-adminandwp-includesfolders from your server. - Upload the new
wp-adminandwp-includesfolders from the downloaded zip file to your server. - Upload all the loose files from the zip (like
wp-login.php,index.php, etc.) to your root directory, overwriting the existing ones.
After following these steps, remember to disable debug mode by setting define('WP_DEBUG', false); in your wp-config.php file to prevent the public from seeing error messages.
Related Support Threads Support
-
How to fix this upload podcast on WordPress problem?https://wordpress.org/support/topic/how-to-fix-this-upload-podcast-on-wordpress-problem/
-
Unable to update to Latest WordPress Versionhttps://wordpress.org/support/topic/unable-to-update-to-latest-wordpress-version/
-
Firefox issue with @wordpress/interactivity module loadhttps://wordpress.org/support/topic/firefox-issue-with-wordpress-interactivity-module-load/
-
Database Errorhttps://wordpress.org/support/topic/database-error-424/
-
Account Recoveryhttps://wordpress.org/support/topic/account-recovery-14/
-
Permission issues with administrator accounthttps://wordpress.org/support/topic/permission-issues-with-administrator-account/
-
“There has been a critical error on this website.” with YOOThemehttps://wordpress.org/support/topic/there-has-been-a-critical-error-on-this-website-with-yootheme/
-
Having trouble adding Google login to my WordPress sitehttps://wordpress.org/support/topic/having-trouble-adding-google-login-to-my-wordpress-site/
-
Lay Out Shift Issueshttps://wordpress.org/support/topic/lay-out-shift-issues/
-
Mailchimp campaign on WordPresshttps://wordpress.org/support/topic/mailchimp-campaign-on-wordpress/
-
Error in page editing when updating secondary language translationhttps://wordpress.org/support/topic/error-in-page-editing-when-updating-secondary-language-translation/
-
Facing Critical Error on Website After Updatehttps://wordpress.org/support/topic/facing-critical-error-on-website-after-update/
-
How to add break tag or how to enable break tag in a section of a themehttps://wordpress.org/support/topic/how-to-add-break-tag-or-how-to-enable-break-tag-in-a-section-of-a-theme/
-
Function “minimum price” to fix if runnung on php 8.3https://wordpress.org/support/topic/function-minimum-price-to-fix-if-runnung-on-php-8-3/
-
My woocommerce shop stops showing randomly….https://wordpress.org/support/topic/my-woocommerce-shop-stops-showing-randomly/
-
Page has Login informationhttps://wordpress.org/support/topic/page-has-login-information/