How to Fix “There Has Been a Critical Error on This Website” in WordPress

Category: Wordpress

WordPress screen displaying “There has been a critical error on this website” message on a laptop
If you are running a WordPress website and suddenly see the message “There has been a critical error on this website”, don’t panic. This error looks serious, but in most cases, it can be fixed easily.

This message appears when something on your website stops working properly. It may be a plugin problem, theme issue, low memory limit, or outdated PHP version. WordPress hides the real technical error and shows this message to protect your website.

In this guide, I will explain everything in simple steps so you can fix the issue without confusion.

Why WordPress Shows This Message

Before fixing the problem, it is important to understand why this error happens. When WordPress finds a serious problem that it cannot handle, it stops loading the website and shows this message.

Let’s understand the common reasons.

1. A Plugin or Theme Stopped Working

Plugins and themes add features and design to your website. But sometimes they can cause problems. This usually happens when:

  • A plugin was updated and became incompatible.
  • A new plugin was installed.
  • Two plugins conflict with each other.
  • The theme is outdated.
  • The theme does not support your current WordPress version.

When WordPress tries to load that plugin or theme and finds broken code, it stops working completely. That is when you see the critical error message.

2. PHP Version Is Old or Not Compatible

WordPress runs on a programming language called PHP. Your hosting server provides a specific PHP version. If your PHP version is too old:

  • New plugins may not work.
  • New themes may not work.
  • WordPress may crash.

For example, if a plugin needs PHP 8.1 but your server is using PHP 7.2, it can cause a fatal error. When PHP cannot run properly, WordPress stops and shows the critical error.

3. Website Memory Limit Is Low

Your hosting gives your website a limited amount of memory. If your website uses more memory than allowed, it stops working.

This happens when:

  • You use heavy plugins.
  • You run many plugins together.
  • Your hosting plan is small.
  • Your website traffic suddenly increases.

When memory is finished, WordPress cannot continue and shows the error message.

What to Do If Your Website Has a Critical Error

Now let’s fix the problem step by step. Follow these instructions carefully.

1. Make Sure You Have cPanel Access

Sometimes when this error happens, you cannot log in to your WordPress dashboard. That is why cPanel access is very important.

cPanel allows you to control your website files directly from your hosting account.

With cPanel you can:

  • Access website files
  • Disable plugins manually
  • Edit important files
  • Check errors

If you don’t know how to access cPanel, log in to your hosting account and look for “cPanel” or ask your hosting support team.

2. Turn On Debug Mode to See the Real Problem

The error message does not tell you what exactly is wrong. So we turn on “Debug Mode” to see the real issue.

How to Turn On Debug Mode

  1. Log in to cPanel.
  2. Open File Manager.
  3. Go to public_html folder.
  4. Find wp-config.php file.
  5. Open it and find this line: define(‘WP_DEBUG’, false);
  6. Change it to: define(‘WP_DEBUG’, true);
  7. Save the file.

Now refresh your website. You may see a detailed error message. It will tell you:

  • Which plugin is causing problem
  • Which file has error
  • If memory limit is exceeded
  • If PHP version is the issue

After fixing the problem, change it back to false.

3. Deactivate the Plugin That Is Causing the Problem

Plugins are the most common reason for this error.

If You Can Access WordPress Dashboard

  • Go to Plugins.
  • Deactivate recently installed or updated plugin.
  • Check if website works.

If You Cannot Access Dashboard

  1. Go to cPanel.
  2. Open File Manager.
  3. Go to wp-content.
  4. Find the “plugins” folder.
  5. Rename it to “plugins-old”.

This will deactivate all plugins. If your website starts working, then one of the plugins is the problem. Now rename it back to “plugins” and activate plugins one by one to find the faulty one. Delete or replace the problem plugin.

4. Check If the Theme Is Causing the Issue

Sometimes the theme may be the problem.

To check:

  1. Go to cPanel.
  2. Open wp-content → themes.
  3. Rename your current theme folder.

WordPress will automatically switch to a default theme. If the website starts working, your theme was causing the error.

You can:

  • Update the theme
  • Reinstall it
  • Switch to a different theme

5. Increase PHP Memory Limit

If debug mode shows memory error, you need to increase memory.

Steps to Increase Memory

  1. Go to cPanel.
  2. Open wp-config.php.
  3. Add this line: define(‘WP_MEMORY_LIMIT’, ‘256M’);
  4. Save the file.

This increases memory limit and may fix the problem. If it does not work, contact your hosting provider and ask them to increase memory.

6. Update PHP Version

If your PHP version is old, update it.

Steps to Update PHP

  1. Log in to cPanel.
  2. Open “Select PHP Version” or “MultiPHP Manager”.
  3. Check your current version.
  4. Update to PHP 8.1 or 8.2 (if supported).

Before updating:

  • Take a backup.
  • Make sure your plugins support new version.

Updating PHP often fixes the error immediately.

How to Prevent Critical Errors in the Future

Fixing the issue is important, but preventing it from happening again is even more valuable.

You can protect your website by following best practices.

Best Preventive Measures

  • Always create backups before updates. A backup allows you to restore your site quickly if something breaks.
  • Avoid installing too many plugins. Excess plugins increase the risk of conflicts and performance issues.
  • Use trusted themes and plugins only. Poorly coded tools are a common cause of fatal errors.
  • Test updates on a staging site. This prevents crashes on your live website.
  • Monitor your hosting resources regularly. Ensure memory and PHP versions are optimized.

Following these practices significantly reduces the risk of encountering this error again.

FAQs

Why did Elegant Themes rebuild Divi instead of just updating Divi 4?

We currently accepting payments via STRIPE and PAYPAL.

1. What causes the “There Has Been a Critical Error on This Website” message in WordPress?
This error is usually caused by a fatal PHP issue in your website’s code. The most common reasons include plugin conflicts, outdated themes, insufficient PHP memory, corrupted WordPress core files, or incompatible PHP versions. When WordPress cannot execute a required function properly, it stops running and displays this error message to protect the site from further damage.
2. Can I fix the critical error without accessing the WordPress dashboard?
Yes, you can fix the error even if the dashboard is not accessible. You can log into your hosting account and use the File Manager or FTP to rename the plugins folder, switch themes, or edit the wp-config.php file. These methods allow you to troubleshoot and restore your website without logging into WordPress admin.
3. Will disabling plugins delete my website data?
No, disabling plugins does not delete your data. When you rename the plugins folder or deactivate plugins, it only stops them from running. Your posts, pages, media files, and database content remain safe. Once the issue is identified, you can reactivate the working plugins again.
4. How do I know which plugin is causing the critical error?
The best way to identify the problematic plugin is by deactivating all plugins first. If the website starts working again, reactivate them one by one and check the site after each activation. The plugin that triggers the error is the cause. You can also enable WordPress debug mode to see detailed error logs that point directly to the faulty plugin.
5. Does updating PHP fix the critical error?
In many cases, yes. If your website is running on an outdated or incompatible PHP version, updating to a stable version like PHP 8.0 or 8.1 can resolve compatibility issues. However, it’s important to ensure your themes and plugins also support the selected PHP version before upgrading.

Conclusion:

The “There Has Been a Critical Error on This Website” message may look serious, but in most cases, it is caused by a plugin conflict, theme incompatibility, memory issue, or PHP problem.

By following this structured approach — checking recovery emails, disabling plugins, switching themes, increasing memory, updating PHP, and enabling debug mode — you can identify the root cause and fix it effectively.

Stay calm, work step by step, and always maintain backups. With the right troubleshooting method, your website can be restored quickly and safely.

Search blogs

Other Blogs

How to Fix reCAPTCHA Not Working in WordPress

How to Fix reCAPTCHA Not Working in WordPress

reCAPTCHA is an essential security feature that protects WordPress websites from spam, bots, and fake form submissions. However, many site owners face issues where reCAPTCHA does not display, fails validation, or blocks legitimate users from submitting forms. If...

Common SEO Mistakes That Hurt Your Website Rankings

Common SEO Mistakes That Hurt Your Website Rankings

You’ve published great content, optimized your website, and waited for the rankings to roll in — but your traffic still isn’t growing. Sound familiar? The truth is, many websites unknowingly make SEO mistakes that silently kill their visibility in Google search...

Social links

Secret Link
SET THE TIME/DATE ACCORDING TO YOUR AVAILABILITY

Schedule an Appointment