“There has been a critical error on this website” is one of the most hideous and alarming WordPress errors that nobody would ever like to face at any time. This error not only blocks you from accessing the website but in the worst condition, it won’t even let you access through the admin page.
It is somewhat like being entirely locked out and the front end is not responding. This is why it is very critical for you to get things right back on track as soon as possible. Or else, your visitors might also have to face the same error message on their screen which is not a great thing for your website’s reputation.
But fortunately, the “there has been a critical error on this website” error has multiple solutions available through which you can easily get access to your website and fix it in no time. Therefore, in this post, we will discuss all the aspects of the “there has been a critical error on this website” error and some best solutions to fix it immediately.
So, stay tuned and keep reading this article to the bottom of this page and get all your doubts/queries cleared in a very easy and comprehensive manner.
Let us get started!
What Is the Meaning of “There Has Been a Critical Error on This Website” Error?
Although there has been a pool of WordPress errors, there is a possibility that someday you might face any one of them while using WordPress. But the “there has been a critical error on this website” error is one of its kind that directly blocks you from accessing the WordPress dashboard.
This WordPress error generally means that there have been some serious issues with your PHP script and due to any reason, it is unable to run and complete its process which is also considered a PHP fatal error.
To help the users and notify them about the error, WordPress has a special feature that automatically detects any fatal error either caused by installed Plugins or themes and immediately sends an email notification to the admin’s email address.
The email notification will consist of detailed information about the cause of the error and it will look somewhat like this:
The email also consists of a special “recovery mode” link through which you can safely log in to your dashboard and investigate further.
In case you didn’t find any email regarding this, please check your email spam folder. However, if you didn’t receive any message in your email by any chance, then you have to find out the cause and fix them as soon as possible.
What Are the Reasons for Causing the “There Has Been a Critical Error on This Website” Error?
If you are using the WordPress platform for a while, then you must have experienced one of the worst WordPress errors i.e. White screen of death (WSOD). You might have been reminded of facing a sudden completely blank white screen while logging into your WordPress site or browsing it.
But nowadays, this White blank screen error has been transformed or changed into an error message “there has been a critical error on this website. Please check your site admin email inbox for instructions.” on your webpage.
So, whatever the reasons that caused the White screen of death earlier, it is much more likely the same reason for triggering the “There has been a critical error on your website” error. That is, the issue happens when,
- There is an issue with your PHP
- Memory limit exceeded
- Error in your core, plugin, or theme files
- Your database has been corrupted.
Whatever the reason is, the error notification sent by WordPress to your email address will specify the reason behind this in detail and it will be easier for you to troubleshoot.
Similarly, there are other similar WordPress errors you might encounter, and looking for their solution too.
- 500 internal error
- 404 error not found
- 502 Bad gateway error
- Error establishing a database connection
- the uploaded file exceeds the upload_max_filesize directive in php.ini
and many more. If you want to learn more, you can also check out our dedicated post on “HTTP status codes” which will definitely help you to know more about WordPress errors.
How to Fix “There Has Been a Critical Error on This Website” Error?
To fix any WordPress error on your website the first thing you need to do is to investigate the cause that is triggering the issue. Although WordPress will send you a notification email regarding the details of the error in case you won’t receive any, then you must follow these simple solutions as given below:
1. Check out your Error logs
When you do not receive any WordPress notification email, the first thing you need to do is to check your WordPress Error log file. This file is responsible for storing all the mishaps or PHP error information. For more details on Error logs and how you can set them up, please refer to our dedicated blog on “How to Set up and Use WordPress Error Log?” in the simplest yet most informational format ever.
To access your Error logs, Use the File Manager of a File Transfer Protocol (FTP) client on your hosting account and go to home/[username]/.logs/error_log_[domain].
Or if you have hosted your website on WPOven, they are available in the logs/ folder for the site.
To access the logs folder, use the SFTP account associated with the site, on login you will see two folders’ logs/ and public_html/.
You will find the logs inside the logs/ folder named error.log and access.log. You may download them using the same SFTP account to your local PC for further review. You may also use ssh to log in and check these logs.
Generally, error logs consist of four types of PHP errors, Parse error, fatal error, Warnings, and critical errors. And if you find any critical/fatal errors, you have to fix that immediately.
2. Activate Debug Mode in WordPress
If you are unable to find your error log file, the alternate method you can try is to activate or enable debugging in WordPress. The WordPress CMS comes with an inbuild special feature called debugging which helps in to find out the PHP error codes in the core software, theme files, or in plugins.
To enable WordPress to debug mode manually you need to add some constants to your Wp-config.php file.
And to configure your wp-config.php file, you need to connect to your server using the File Transfer Protocol (FTP) client. Most probably you will find the wp-config.php file in your root folder or your website and when you can locate the file, open it and make some edits.
The wp-config.php file mostly contains all your website’s configuration settings, such as settings by web hosting provider, database information, and other vital information. Now to enable the WP debugging, you need to look out for this line of code:
Now, when you can find the above code line, the next thing you need to do is copy the code below over the
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define( 'SCRIPT_DEBUG', true );
/* Now you are done, save and Exit
- WP_DEBUG means to enable the debugging mode on WordPress.
- WP_DEBUG_LOG lets store all the error details in a log file.
- WP_DEBUG_DISPLAY shows error messages on the page in HTML
Note: It is not highly recommended to change the WP_DEBUG_DISPLAY to true or else the errors will start displaying on your live website.
After pasting the above code in your wp-config.php file, you need to save the changes and exit the text editor. Now you have successfully activated the Debugging mode.
However, if you like to enable just the basic WordPress debugging mode, you can add the code below:
define( 'WP_DEBUG', true ); // To enable WP_DEBUG mode on
Now once you can debug your website, you can disable the debug mode by either setting the constants to false or by simply removing the snippet from the wp-config.php file.
To learn how you can enable/activate WordPress debugging, please check out our complete guide on “WordPress Debugging: How To Enable WP_DEBUG?“
3. Revert/Restore Your WordPress Site
When your website is being hurdled up with WordPress errors and you couldn’t able to find the possible causes and their solution, the best thing you can do is to restore your website from the backup. Yes, you heard it right, it is why we always push everyone to keep the latest backup of their websites all the time.
Even if you face the same issue, it will be easy for you to track the steps that you are following that might trigger the error.
Well, how you restore your website completely depends upon the method you used to back up your website. If you used any WordPress backup plugin, you must refer to their knowledge base or documentation for further steps.
Or if your web host manages your website backup, please contact your web hosting provider. At WPOven, all the websites you hosted will be backed up automatically daily powered by Amazon S3 and when you like to restore it back, you can either:
1) Drop a support ticket and our support team will be happy to restore the backup for you. OR
2) You can Download the desired backup and restore it by logging in through SFTP.
Note: Try to restore your live site on a staging platform first and see if your website is working properly or not and avoid the vulnerability of vanishing your hard work.
4. Solve Any Theme Conflict
Sometimes, the “there has been a critical error on this website” error can be triggered due to some conflict in your active theme file. The best way to deal with it is to simply revert back to your default theme and see if the issue has been resolved or not.
However, in case you are unable to access the admin panel or WordPress dashboard, use an FTP client such as File Zilla to access your website files on the server and navigate to public_html folder > wp-content>themes. Search your active theme folder and either rename it as “youractivetheme-disabled” or completely delete it.
If your website is able to load completely without any issues, then it means there was an issue with your previous theme. Now to restore your previous theme, you can simply either install it again or rename the folder back to its original name.
5. Investigate Installed WordPress Plugins
If you are still having a critical error on your website, check if there is any issue with your installed plugin. If you are able to access the admin panel or WordPress dashboard you need to disable all the installed WordPress plugins on your website first by navigating through Plugins > Installed Plugins and marking the checkbox at the top of the list to select them all. Then click Bulk Actions > Deactivate.
However, in case, if you are unable to get access through the admin panel of the WordPress dashboard, use an FTP client such as File Zilla to access your website files on the server and navigate to public_html folder > wp-content>plugins.
Likewise, you did in the case of themes, rename all the plugin folders into yourplugin_disabled but left the element (if you have installed) plugin directory as it is. And check if your website is functioning properly or not.
If your website loads perfectly, then it means the plugin was the main culprit for triggering this error. Now to find out the exact plugin that is causing the issue, you have to install each plugin one by one and reload the webpage simultaneously.
If you used the manual method to disable the plugins by renaming the plugin directories, to get them back rename all the plugin directories back to their initial or previous name by following the same step.
6. Check Your PHP Version and Upgrade It to the Latest Version Available
An outdated or old version of PHP is often responsible for your website breaking and generally responsible for other website conflicts occurring. For running WordPress successfully, the PHP version must be either 7.4 or more.
However, some webmasters prefer to stay on PHP version 7.4 so that it could not raise any compatibility issues with your current themes and plugins. But if you are using a PHP version below 7.4 then you must be required to upgrade it to the latest version available that can solve the issue “there has been a critical error on this website”.
WPOven users can upgrade their PHP version, by simply requesting Custom support and our Experts will do it for them without needing to follow any complicated steps.
7. Increase Your PHP Memory Limit
Apart from the Theme or Plugin being the culprit for “there has been a critical error on this website”, your limited PHP memory is generally the actual reason to blame.
PHP memory limit is actually termed as the fixed Ram memory that your web server has and this memory limit is set up by WordPress to run PHP scripts within the values. When this PHP memory limit exceeds, the outcome will be the White screen of death or Critical error.
On the other hand, you cannot set your PHP memory limit even too high, or a long PHP script will slow down your website to crawling. However, the default PHP memory limit can be too low for your website, therefore slightly increasing the limit will definitely fix the critical error.
Step1: To do so, the first thing you need to do is to access your web files via an FTP client i.e File Zilla, and look for the wp-config.php file.
Step2: Open your wp-config.php file and add the following code snippet just before the final line of code and save it.
define( 'WP_MEMORY_LIMIT', '256M' );
Now if it works, that means whatever plugin you have installed and used might be corrupt or broken and needs to be deleted immediately.
8. Increase Your Upload Max File Size Limit
If you are experiencing the “there has been a critical error on this website” only on certain pages not all, then it can be fixed by slightly making changes to your PHP functions for avoiding certain large pages to break you need to slightly raise their recursion and backtrack limits.
To increase your upload max file size limit, you can check out our detailed post on “ How to fix “the uploaded file exceeds the upload_max_filesize directive in php.ini” Error? “
But to fix breaking or certain large pages on your website, you need to insert the following code snippets in your wp-config.php file right before the final line of code.
9. Scan Your Website for Malware
Sometimes, hackers put malicious scripts in themes or plugins to get infiltration your website and these scripts intentionally damage your website performance by slowing it down or triggering error messages on your webpage.
Detecting the malware and even removing a compromised faulty plugin or theme can be a daunting task, it can become even worse if you are unable to get access through the admin page and are completely locked out.
In addition to that, it is also very difficult to figure out which line of code is malicious unless you are a hardcore developer. Deleting random files won’t help you either, in fact, it can severely damage your website as well.
In this situation, the best thing you can do is to either restore your website from the backup or contact your web host for help.
10. Purge Your Website Cache Memory
Cache memory somewhat helps in loading your website faster and even reduces loading time. In fact, mostly it turned out to be a good thing for your website.
But sometimes this cache memory can also get corrupted over time and triggers these types of errors on your website. To get rid of this, the best thing you can do is to clean or purge your cache.
To do so, you can refer to our dedicated post on “How to Clear WordPress Cache on Your Website in 2022?“
Note: Do not worry about the cache memory being cleared, the cached version of your website will be stored back as soon as your website is restored and it will start loading quickly again.
11. Contact Support
In the worst case, if all the above-mentioned methods failed to fix the “there has been a critical error on this website” error. The only option left is to contact your web hosting support team or a Freelancing WordPress Expert that can help you to fix this critical error in no time.
WPOven offers industry-leading WordPress maintenance services with 24×7 WordPress Expert support included in every plan without any additional charges. With a higher response time and years of WordPress experience, our Expert team will help you to get your website back on track as fast as possible.
From the above-detailed post on “there has been a critical error on this website” error, you must have figured out that it can be caused due to multiple reasons and in the majority of the cases it was related to the PHP.
The instant and easiest method to fix this issue is to quickly restore your website from backup (if you have previously done it) or else we have already provided you with plenty of other alternate solutions.
Fixing WordPress errors can be a tricky and daunting task for anyone, especially beginners, but you do not need to give up if you cannot fix it yourself. You can always get industry-leading WordPress Expert Support from Web hosts like WPOven.
If you have any queries or would like to share your experience with similar WordPress critical errors, please do let us know in the comment section below.
At WPOven your website will be less likely to experience any WordPress critical errors but if by any chance it happens, we have the following best features that you can count on us.
- Industry-leading WordPress Expert Support 24×7
- Enterprise level WordPress optimized Infrastructure
- Regular malware scanning
- Uptime monitoring
- Automatic regular backups and much more.
You can have all these features and much more in a single plan with unlimited Free migrations, unlimited staging, and a 14-day risk-free guarantee, Signup Now!
Frequently Asked Questions
What does the critical error mean on WordPress?
The critical error or “there has been a critical error on this website” message will start displaying on your webpage when, there is an issue occurred due to your faulty plugin, theme, or PHP limited memory exceeded.
How do I fix a WordPress error?
To fix any WordPress error there are some basic things you need to follow are:
1. Choose a most reliable and reputed Web host
2. Update your WordPress core files, plugins, and themes with the latest version available.
3. Use a caching plugin.
4. Backup your website on a regular basis
5. Edit or test your website on the staging environment first
6. Install Plugins or Themes from genuine sources only
7. Upgrade your PHP version
Why am I getting a WordPress error?
There could be many possible reasons for getting a WordPress error, but some of the most common reasons are:
1. Internet or server connection issues.
2. Check your firewalls and DNS configuration
3. Check your browser settings
4. Clear your cache memory on the browser
5. Incorrect file configurations
6. Malware and many more.