Have you ever encounter the “there has been a critical error on this website.” error on your computer? If you have encountered the same issue, you can find the useful solutions in this post, which is provided by MiniTool Partition Wizard.
If you encounter critical errors on your WordPress, you will find these critical errors stop your site from loading all the scripts it needs to work properly. And that will bother you a lot.
Some of the errors can also result in a white screen of death, a fatal error, or a 500 internal server error. But usually, users encounter a generic error message saying “there has been a critical error on this website. ” error. The full error message is “There has been a critical error on this website. Please check your site admin email inbox for instructions.” with a link to the WordPress debugging guide.
The common reasons for “there has been a critical error on this website.” errors are:
- Incompatibilities among your theme and plugins during updates
- A specific malfunctioning theme/plugin
- Memory limit being surpassed
- An issue of database corruption
Solution 1: Examine the Error Logs
Checking the error log file, which contains information about PHP errors, is the first method you can take to resolve the “there has been a critical error on this website” error.
The warning, notice, parse, and fatal PHP error categories are all listed in this file. So, you can see what kind of problem was discovered at the start of each log.
If you want to check this, you must access your hosting account’s File Manager via a File Transfer Protocol (FTP) client, and then navigate to home / [username]/.logs/error log [domain]. If you discover a parse or fatal error, you must correct it.
If you can't locate the error_log file, you can ask your hosting provider for help. But you need to note that the error_log file will only be available if you enable PHP error logging. To enable PHP error logging, you need to configure the PHP settings in your hPanel.
Solution 2: Enable Debug in WordPress
If you encounter the “there has been a critical error on this website.” error on your computer, you can also try enabling debugging in WordPress to fix it.
Because if the debug mode is on, you’ll be able to see the various PHP errors occurring on your site, and you can use this to trace back to the root of the issue. You can do the following to manually turn on debugging or access the debug log.
Step 1. Connect to your site with FTP.
Step 2. Find wp-config.php in the root folder and open it with a text editor or IDE.
Step 3. Then you need to place the following code at the bottom of the document before the final message, and then save and close the file:
- define( ‘WP_DEBUG’, true );
- define( ‘WP_DEBUG_DISPLAY’, false );
- define( ‘WP_DEBUG_LOG’, true );
Step 4. Once done, you can enable the debug successfully and all the errors can be written to the log. And then, you can find the debug log in the wp-content folder, named debug.log .
Step 5. When you’re finished debugging, make sure to remove these lines of code.
Solution 3. Upgrade PHP Version
WordPress requires PHP 7.4 or greater. So, you need to check the PHP version on your web host. If you find you’re using an older version of PHP, you can upgrade it to 7.4 or greater to fix the “There has been a critical error on your website” error. Here’s the guide:
- Using hPanel, go to the Advanced > PHP Configuration
- Next, you can see the active PHP version on the PHP Version
- If it runs on PHP 7.3 or a lower PHP version on your web host, you need to select PHP 7.4 or PHP 8.0 and click Save.
Solution 4. Solve Any Theme or Plugin Conflicts
Incompatibilities among your theme and plugins during updates or a specific malfunctioning theme/plugin can also cause the “there has been a critical error on this website.” error. So, you can solve all the theme or plugin conflicts to solve this error.
The first thing you need to do is to check your theme. If you have access to the WordPress admin area, simply switch the active theme to a default one such as Twenty Twenty-Two.
However, if you can’t access the admin panel, you can do as follows:
- Use the File Manager.
- Go to public_htm l > wp-content > themes.
- Find your active theme’s folder and rename it to youractivetheme-disabled.
- Once done, reload the site. If it loads as expected, then you can confirm that there’s a conflicting theme present. So, you may have to roll back to the theme’s previous version or get an entirely new theme instead.
If the error still exists, you need to check if there’s an issue with your plugins. If you have access to the WordPress admin panel, disable all plugins. If you can’t, you can do:
- Use the File Manager.
- Navigate to public_html>wp-content>plugins.
If you’re using hPanel, you can do it another way. Go to the WordPress > Plugins section and then disable all plugins.
Bottom Line
This post provides a full guide for you to solve the “there has been a critical error on this website.” on WordPress website. If you have encountered the same error, you can choose one the solutions in this post to solve it.
If you are interested in MiniTool Partition Wizard and want to know more about it, you can visit MiniTool Partition Wizard’s official website by clicking the hyperlink. MiniTool Partition Wizard is an all-in-one partition manager and can be used for data recovery and disk diagnosis.