7 Simple Ways To Fix “There has been a Critical Error on this Website” Error

Nothing is more frustrating than coming across an error while working on your website. Especially if the error says, " there has been a critical error on this website". Wouldn't it cause you a lot of stress if there is a major issue with your WordPress site?

Well, worry not; most of the time, this error occurs due to conflicting theme files, faulty plugins, and PHP-related issues. Luckily, all of the issues are solvable.

This article will explore what is this critical error and what are its major causes. Furthermore, we would look at ways how to solve the "there has been a critical error on this website" issue.

Why Does the Error Message "There has been a Critical Error on this Website" Appear?

The error message " there has been a critical error on this website" refers to issues related to PHP on WordPress. Mostly it occurs when there is a fatal issue in PHP code execution on your site. This message occurs when PHP scripts are unable to complete their process. Hence it stops scripts from running.

Normally "there has been a critical error on this website" error occurs when WordPress is unable to load core files or a plugin functionality. However, there may be other reasons as well, which we will discuss further.

What Causes the "There has been a Critical Error on this Website" Error?

An issue such as "there has been a critical error on this website" may occur due to the following reasons:

  • Outdated or Incompatible PHP Version: This error will occur if your PHP version is outdated. However, there is an exception; some websites rely on an older version of PHP, so upgrading PHP would also result in such an issue. Therefore, it's crucial to upgrade & downgrade based on your website.
  • Malware Issues: Errors and issues would also lead to this error. This is why you should scan websites for errors and remove them.
  • PHP Memory Limits: PHP servers have specific set limits for executing scripts. When your website runs out of predefined limits, it stops you from uploading files, showing the error.
  • Issues in Plugins or Themes: Faulty or outdated Plugins and themes may also result in this error. Therefore it's crucial to look for user reviews of Plugins and themes to install trusted tools only.
  • Problems in Core Files: Sometimes, core files are responsible for showing the error. It may occur when there is any issue while uploading core files. Or someone has tempered with the core files. All of this leads to a critical error.
  • Syntax Errors: Custom code, particularly if it contains unintentional syntax errors or paths with unsafe characters, can unintentionally result in problems that prevent standard PHP code execution. To find potential syntax issues in your code, look for any recent changes or alterations to the environment of your website.

7 Ways To Fix the "There has been a Critical Error on this Website" Error:

Now we are familiar with the reasons behind the "there has been a critical error on this website" issue. Let's look at ways to fix this error.

1. Look for Malware

One of the major reasons for critical errors is due to malware. These suspicious scripts may cause harm to your website or tamper with the WordPress core files. Therefore it is wise to keep an eye on scripts and look for suspicious ones that you cannot trace back to any plugin or theme.

You will need to carefully scan your website for malware. Because it's not always too easy to identify and differentiate between legitimate and corrupted files, and don't even think about changing or removing core files because you may have to regret it later. A wise solution would be to contact your hosting provider for this issue.

2. Update the PHP Version

An outdated PHP Version may cause a critical error. This is why you must ensure your PHP is up to date. An updated version ensures that everything is up to speed and smooth functioning on your website.

Ideally, you should keep your PHP version to its latest edition. However, some themes may not work well with the newest version of PHP. However, this is a rare situation.

3. Clean Site Cache

Some websites use a process known as caching to store data on your browser to open the site quickly. Hence resulting in a quality user experience. However, sometimes cache files get bugs, which causes errors to appear similar to critical errors.

Therefore the solution here is to clear the site cache to remove all the errors, which would help you work smoothly on your site.

4. Increase PHP Memory Limit

PHP Memory refers to the amount of space a web server has to store your files. CMS software like WordPress is a lot specific for a site to upload files. When this space limit is exceeded, you won't be able to upload more files, resulting in a critical error. Therefore increasing the PHP Memory Limit would solve the problem.

However, you should take caution in increasing the limit and not raising it too much. It would result in slow crawling to your website and affect your overall site performance. But you should raise the PHP Memory limit slightly to remove this issue.

To increase PHP Memory Limit, Follow the steps below:

  1. Open wp-config.php by logging into your site via FTP.
  2. Type the following code and then save.

"define( 'WP_MEMORY_LIMIT', '128M' );."

5. Disable All Plugins

Plugins are a great day-saver when it comes to running an online business. They add advanced functionality to your website, hence easing the manual work. However, a faulty plugin may cause a critical error, which could create a frustrating situation.

Normally, we all have several plugins installed on our website, which makes it harder to identify the faulty one. Therefore you should disable all your plugins and see if the problem occurs. If the problem is solved, then plugins are the main issue.

After disabling all the plugins, turn them on one by one and see when the problems occur. Hence helping you to identify the culprit. Here is how you can disable the plugins on your WordPress:

  1. Open WordPress and Navigate to Plugins
  2. Here you will see all the installed Plugins
  3. Click on all the plugins and select bulk action, and further select Deactivate

  1. Similarly, you can activate them one by one plugin by selecting the Activate Option
  2. Additionally, Delete the faulty or irrelevant plugins from your website.

 

6. Revert to a Default Theme

Often, a faulty or outdated theme may be the reason behind the critical error. One of the easiest ways to prove this is to delete your current theme and revert to a default theme. If the error is due to a theme, this would immediately solve the problem.

Before deleting your theme, it is wise to back up your site to protect the data. To delete your current theme, follow the step below:

  1. Open WordPress and Go to Appearance

  1. Click on Themes and Delete the currently active theme

Doing this would result in automatically reverting to a default theme.

7. Enable Debug WordPress

WordPress comes with fully loaded features to provide a quality user experience. A built-in debugging system in WordPress identifies code errors in theme and plugin code. You can enable WordPress to debug mode by opening the wp-config.php file in your public_html folder. Here you will be able to see the following lines:

Here "false" values mean that the WordPress debug mode is not functioning. Therefore, you will need to replace it with "True". When you active the WordPress Debug, here is what these 4 lines would do:

  • WP_DEBUG: It triggers the debug mode in WordPress.
  • WP_DEBUG_DISPLAY: These displays debug messages on site pages.
  • WP_DEBUG_LOG:  This stores error information in a debug.log file.
  • SCRIPT_DEBUG: This script runs the “dev” versions of core Javascript and CSS Files.

You will need to refresh your site after you have enabled the debugging mode. Now you will be able to see the following message.

Follow the instructions to enable working smoothly on your website. Finally, you should deactivate the debug mode by changing the values from "True" to "False".

Conclusion

To conclude, we understand that coming across the "there has been a critical error on your website" issue is stressful. However, there is no need to panic. Here we have discussed the proven ways to eliminate this critical error.

Critical errors can occur for several reasons, including the PHP limit reached, faulty plugins or issues in core files. Here we have mentioned simple ways to get back to work on your website smoothly.

FAQs

What does it mean by Critical Errors on WordPress?

WordPress critical errors are usually caused by malfunctioning plugins, scripts, or code that prevent WordPress from functioning properly. If you don't fix this issue, WordPress cannot load the rest of the needed files.

What is the most obvious way to get rid of WordPress Errors?

You should probably start by clearing your cache. By storing data, caches speed up sites loading on your browser. Clearing it can help you remove outdated content, which may solve your problem. Finally, you should go for updating plugins, themes, and core files.

How to fix "There has been a critical error on this website?”

You can enable WordPress debugging by logging into the hosting dashboard and then going to Sites > Tools > WordPress debugging. Once you've found the cause, you can investigate your site or check the log. When you're done, disable debugging since it is visible to your visitors.

.com Domain
$5.96/yr
Free 3 months Starter Hosting with every purchase of .COM domain Search Now