How to Fix ‘There Has Been a Critical Error on This Website’ in WordPress
Table of Contents
- What Causes the Critical Error in WordPress
- Best WordPress Hosting
- Step 1: Check Your Email for Error Details
- Step 2: Enable WordPress Debug Mode
- Step 3: Deactivate All Plugins
- Step 4: Switch to a Default Theme
- Step 5: Check PHP Version Compatibility
- Step 6: Increase WordPress Memory Limit
- Step 7: Reupload WordPress Core Files
- Step 8: Contact Your Hosting Support
- Final Thoughts
Reading Time: 4 min, 16 sec
Seeing the message “There has been a critical error on this website” can be stressful, especially if your site suddenly goes down. This error usually appears when WordPress runs into a fatal PHP issue and cannot continue loading the site. The good part is that this error is fixable in most cases. In this guide, I will explain what causes this error and how you can fix it step by step, even if you are not a developer.
What Causes the Critical Error in WordPress
This error usually happens because of one of the following reasons.
Best WordPress Hosting
Bluehost is one of the best and secure WordPress hosting provider- A faulty plugin or theme
- A recent WordPress, plugin, or theme update
- PHP version incompatibility
- Memory limit issues
- Corrupted core WordPress files
WordPress now hides the exact error from visitors for security reasons. That is why you see a generic message instead of a detailed error. But you can easily troubleshoot and fix the problem.
Step 1: Check Your Email for Error Details
When this error occurs, WordPress often sends an email to the site admin address. This email usually contains the actual error message and tells you which plugin or theme caused the problem. It may also include a recovery mode link.
If you received this email, read it carefully. In many cases, it directly points to the source of the issue. If you can access the recovery mode, log in and deactivate the problematic plugin or theme from there.
Step 2: Enable WordPress Debug Mode
If you did not receive any email, the next step is to enable debug mode. Connect to your site using FTP or File Manager and open the wp-config.php file.
Look for this line.
define('WP_DEBUG', false);
Change it to this.
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
Save the file and reload your website.
Now WordPress will show the actual error message. This message usually tells you exactly what went wrong and which file caused it.
Once you identify the issue, you can turn debug mode off again.
Step 3: Deactivate All Plugins
Plugins are the most common reason behind this error. If you cannot access the WordPress dashboard, connect to your site via FTP. Go to wp-content and rename the plugins folder to something like plugins-old.
This will deactivate all plugins at once.
Now refresh your website. If the site starts working, it means one of the plugins was causing the issue.
Rename the folder back to plugins and activate plugins one by one from the dashboard until you find the problematic one.
Step 4: Switch to a Default Theme
If plugins are not the issue, the active theme might be causing the error.
Using FTP, go to wp-content/themes.
Rename your active theme folder. WordPress will automatically switch to a default theme like Twenty Twenty-Four.
Now reload the site.
If the site works, your theme has a problem. This usually happens after a theme update or due to outdated code.
Step 5: Check PHP Version Compatibility
Many hosting providers allow you to change the PHP version. Log in to your hosting control panel and check the PHP version your site is using. If your theme or plugins are not compatible with the latest PHP version, WordPress may break. Try switching to a stable version like PHP 8.0 or PHP 8.1 and test the site again.
Always avoid using very old or very new PHP versions unless you are sure everything supports it.
Step 6: Increase WordPress Memory Limit
Sometimes this error appears because WordPress runs out of memory. In such cases, incresing memory limit can fix the issue.
Open wp-config.php and add this line above the “That’s all, stop editing” comment.
define('WP_MEMORY_LIMIT', '256M');
Save the file and refresh your site.
If memory was the issue, this simple change can fix it instantly.
Step 7: Reupload WordPress Core Files
If none of the above steps work, WordPress core files may be corrupted.
Download a fresh copy of WordPress from the official website. Using FTP, upload the wp-admin and wp-includes folders and overwrite the existing ones. Do not touch the wp-content folder. This replaces core files without affecting your content or settings.
Step 8: Contact Your Hosting Support
If the error still exists, contact your hosting provider. Hosting support teams can check server error logs and spot issues that are not visible from the WordPress side. Many times, the issue is related to server configuration or security rules.
Final Thoughts
The “There has been a critical error on this website” message looks scary, but it is usually caused by a small and fixable issue. In most cases, a plugin, theme, or PHP compatibility problem is responsible.
The key is to stay calm and follow a structured approach. Start with plugins, then themes, then server related checks.
Once fixed, always update plugins and themes carefully and keep backups enabled. This helps you recover quickly if something goes wrong again.
If you follow these steps, you should be able to fix this error and get your WordPress site back online without panic.