Introduction
The "There has been a critical error on this website" message in WordPress usually appears when something breaks in the backend, most commonly due to a faulty plugin, theme conflict, or an outdated PHP version.
Here is a step-by-step guide to troubleshoot and resolve this error quickly:
Step 1: Enable WordPress Debug Mode
To find the exact cause of the error, you need to see the actual error message instead of the generic warning.
-
Log in to your cPanel and open File Manager.
-
Navigate to your website's root directory (e.g.,
public_html). -
Find the
wp-config.phpfile, right-click it, and select Edit. -
Scroll down to find the line that says:
define( 'WP_DEBUG', false ); -
Change it to
trueby editing it like this:
PHPdefine( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', true ); -
Save changes and refresh your website. The specific error or conflicting plugin/file name will now appear on the screen.
Step 2: Check for Problematic Plugins or Themes
Most of the time, a newly updated plugin or theme causes this crash.
-
Go to your cPanel File Manager and open
public_html/wp-content. -
Rename the
pluginsfolder toplugins_backup. -
Check your website:
-
If the site starts working, it means one of your plugins is causing the issue. Rename the folder back to
plugins, then go inside the folder and rename each plugin folder one by one to find the culprit.
-
-
If plugins are fine, check your active theme inside the
wp-content/themesfolder and temporarily rename it to switch back to a default WordPress theme (like Twenty Twenty-Four).
Step 3: Update PHP Version
WordPress requires a stable and updated PHP version (such as PHP 8.1 or 8.2).
-
Log in to your cPanel and search for Select PHP Version or MultiPHP Manager.
-
Ensure your domain is running on a recommended, updated PHP version. If it's running on an older version (like 7.4), upgrade it to fix compatibility issues.
Conclusion
Once you fix the conflicting plugin/theme or adjust your PHP version, don't forget to revert your
wp-config.php debug mode back to false for security purposes. If you need further assistance, feel free to open a support ticket with our HostBreak team!