October 18, 2024

You’ve come to the right place if you are facing the problem “there has been an error on this site.” This is the best place to look for a fix. As a web developer, I have faced this problem many times, not only on my website but also on my clients’ websites.

This problem has been solved successfully every time. This is usually due to using the wrong themes, plugins, or PHP versions. It is important to identify the root cause of this problem.

You’ll know what to do once you have identified the problem. There has been a critical mistake on this website. Let’s look at the details, which will allow you to understand the cause and best solution.

What is “There has been a critical error on this website” and its causes

If you’ve ever received the warning “There’s been a critical mistake on this website,” don’t worry; I’ve got you covered! I’ll break down all the possible causes so you know what is happening.

The use of bad themes and plugins is a common cause. Even seemingly innocent additions can indeed cause havoc behind the scenes. I recommend using premium themes such as Astra, Divi Kadence, and others.

The PHP version, as well as the memory limit, can also be a problem. Compatibility issues can arise when using an outdated PHP version. PHP’s memory limit is 32MB, which is the standard memory limit.

It’s as if you run out of space when your website reaches its PHP memory limits. The website can’t perform the tasks that it is supposed to, leading to a critical error. Your site is saying, “Hey! I’m not able to do this. I need more RAM!”

The other two major causes are malware and the cache of the website. All these problems can be easily solved if you follow the guidelines I will discuss below. Let’s get started.

How to Solve Website Errors – 8 Effective Ways

Here are eight effective ways to fix the “critical error” on this website problem. It’s important to start with the first solution, “checking the site theme,” and then progress onwards.

Check the Theme

When one of my clients or I encountered the “there was a critical mistake on this website” problem, I first checked the theme. If you want to avoid issues, a good theme is important. It directly impacts the user experience and can cause errors.

Some themes may be badly coded, lacking proper updates, or conflicting with other elements of your website. If a theme has been coded haphazardly or contains errors, this can have ill effects on your website’s operation.

How can you avoid such a mishap? It’s as simple as choosing a theme from a reputable source. Choose free themes or premium ones developed by authors you trust who maintain them. You can easily change the WordPress theme using cPanel.

Choose “Public_HTML,” “WP Content,” and “Themes,” and then click “Save.”

Choose the ” Upload ” option from the ” Themes ” file.

Download the zip file and extract it into the same folder.

After extracting the “zip file,” delete it.

You’ve changed the theme successfully.

Three WordPress themes are recommended to create your website!

Deactivate Faulty Plugins

The plugin is next in line to cause problems. Not all plugins cause problems, but certain ones can. This is the primary reason why I only install necessary plugins. You may have more problems if you use more plugins.

Identify the last plugin that you downloaded. Recently downloaded plugins usually cause this critical error. Please remove the plugin from cPanel after you have discovered it.

Log in to your website’s cPanel.

Find the Public_HTML file by selecting ” File manager”.

Choose ” Wp content “> “plugins.”

Find the plugin that you wish to remove and delete it.

If you do not know which plugin is causing the problem, then deactivate them all. Due to the error, it is impossible to access your WordPress dashboard. The only way to do this is through cPanel.

Click on ” file manager” in the cPanel.

The ” WP content” file can be found by clicking on ” Public_HTML.”

Rename the folder “plugin” to “plugin XXX.”

Check your website to see if it is working.

Rename the file from “plugin XXX ” to “plugin” again.

Increase PHP Memory Limit

PHP memory limits in WordPress are the maximum amount of memory PHP, the scripting engine that powers WordPress can utilize when executing scripts. WordPress has a default memory limit of 32MB to ensure compatibility.

PHP cannot handle the workload when the script exceeds this limit. This leads to “memory exhaustion”. The “There has been an error on this site” message is triggered by this exhausted memory condition.

You can access your cPanel.

Please open the file wpconfig.php by selecting it.

Edit this file by adding the code at the end: define(‘WP_MEMORY_LIMIT,’ ‘128M’);

Save your changes and test the website.

Clear website cache

Clearing the cache is a good way to troubleshoot if visitors are reporting strange behavior or errors on your website. This has helped me solve the problem of “there was a critical mistake on this website” many times.

Log in to your hosting’s cPanel.

Click on “LiteSpeed WebCache Manager.”

Select “Flush All” from the “Flush LS cache” section.

Try to log into your website after clearing the cache using the “Flush All” option.

Follow the other solutions if you still see the error.

Check the simple caching process if you are using Cloudways to fix this WordPress error.

Update PHP Version

The WordPress PHP Version is the PHP version that your WordPress website currently uses. It’s vital to update your PHP version for the security of your site.

The latest PHP releases may not have the functions necessary to support the new WordPress themes and plugins. The mismatch can cause conflicts and errors.

Login to the WordPress dashboard.

Choose ” Tools Site health ” from the list of options.

Scroll down and select ” server ” from the ” info ” tab.

Check the PHP version in the server settings.

Update your version as soon as you can using cPanel. PHP 8.2 is the current version. It may be different when you read this guide. Always check the WordPress official website for updates.

Leave a Reply

Your email address will not be published. Required fields are marked *