What’s Causing There has been a critical error on your website.
This automated email is sent to you when a plugin or theme causes a fatal error on your site, as WordPress officials stated. Thus, it is evident that PHP FATAL errors can cause such issues. When PHP encounters a fatal error, it can no longer complete the process and requires your intervention. You cannot complete your request if you receive a FATAL error. With WordPress, you no longer see broken pages with several errors. That’s it.
No email? Check server error logs (error_log)
You may be able to locate the relevant entry in the server logs if you aren’t receiving the email from WordPress? You might find a solution from that information as well. FTP or cPanel are the only methods of accessing WordPress’ error log. For information on where error logs are stored, contact your hosting provider since host locations vary.
Quick Tip Turn on Debug Mode
The quickest way to know why WordPress is throwing this error or what’s causing the problem. Edit your wp-config.php from WordPress’s root folder then follow the final steps on this post below.
Turn on debug mode so you can find more details about the issues you are facing. Try to find errors log in the FTP that can also guide you about problems.
//Turn on Debug Mode. //Find following like in wp-config.php and replace FALSE with TRUE //FIND define('WP_DEBUG', false); //And replace with define('WP_DEBUG', true);
Upgrade PHP to 7.4 Or Greater
As WordPress 5.6 and even 4.xx recommend PHP 7.4, I think you need to upgrade your PHP version in order to resolve the issue you are experiencing. Identifying the version you are running can be done by contacting your host.
What are WordPress Requirements?
PHP 8.0 is now supported by WordPress 5.6. However, PHP 8.0 has not yet been adopted by many hosting companies. Therefore, WordPress continues to support 7.2, 7.3, and 7.4. You can also find the WordPress requirements here.
WordPress recommends servers running version 7.4 or greater of PHP and MySQL version 5.6 OR MariaDB version 10.1 or greater.
We also recommend either Apache or Nginx as the most robust options for running WordPress, but neither is required.
How to check your PHP version?
To check your current PHP version you can create a new file, let’s say serverinfo.php. Now edit this file and add the following code in the file. After that run file, it will give you all information about the system your server is running.
<?php phpinfo(); //PHP function to get php information
Upgrade your PHP version via the .htaccess file. You can also learn how to upgrade the PHP version via FTP or cPanel file manager. Mostly upgrading PHP version fix WordPress “there has been a critical error on your website” Error.
Is this issue related to a plugin?
Due to the fact that you are unable to access your WordPress admin area, please try using your cPanel file manager or FTP to access the public_html directory.
To restore your site, go to the wp-content/ directory, then rename the plugins/ directory to pluginsbackup/. Using this method indicates that there is an issue with a plugin.
If the problem is with the plugin change back the directory name pluginsbackup/ to plugins/ Enter in the plugin directory. Now rename each plugin’s directory by placing a backup at the end of that directory name.
Start by getting the original names of the plugin directories and making sure the website still works after you have changed the plugin directory names. Delete the plugin that has caused a problem as soon as you find it.
Troubleshoot your WordPress Theme
Just to make sure if the issue is not a WordPress theme again go to file manager in cPanel or public_html via FTP. Go to the directory wp-content/ and there you can find themes/ directory.
Enter in the themes directory and rename the theme which is active on your website. By adding backup on its directory name. Then see if wp-admin/ start working if that does so this means the problem is with your Theme.
Otherwise, rename your theme back to its original name and try something else. The problem is not with your theme.
If the problem is with the theme and you are not the theme author try to reach the theme author ASAP they can help you to solve the issue. If you are a developer then follow the steps below.
There has been a critical error on this website.
The case where you are running a WordPress network instead of a standalone installation of WordPress. In this case, the errors are connected to the sites in the network. During the generation of this website, a critical error occurred. The same goes for a theme on a specific website or a plugin that mentions like on this website rather than on this network.
We have another post that might help you in case you haven’t been able to resolve the issue yet. We are experiencing technical difficulties on the site. Then you can fix the critical error on your website as well.