WordPress is the preferred CMS platform for many businesses as it facilitates seamless content updates and easy updations. Its simplistic user interface combined with advanced plugins and themes makes it a preferred choice. However, like every other website that is built using other technologies, WordPress websites are also prone to a few errors. “There has been a critical error on this website” is one of the most common issues faced by many businesses. Now, encountering this for the first time can be overwhelming by the sound of the word “critical”. In practice, this is very common and can be addressed through simple steps.

This blog is your ultimate guide to fixing your website that says “There has been a critical error on this website”. We guarantee that after reading this informative blog, you will be able to fix this issue on your own, without the need of consulting your WordPress service provider. We will not only be discussing the quick steps on how to find and fix this issue, but we will also find out, why this error occurs and how to prevent it in the future.

Common issues that lead to the 'There has been a critical error on this website' error

Various issues can lead to this error, and most of the time it has something to do with either the plugin or the theme. Here is a list of all possible issues that can lead to critical errors on WordPress:

  • Issues with WordPress core files: When any of your core WordPress files are either corrupted, missing, or placed with mismatched location paths, it leads to critical error.
  • Broken theme files: As WordPress is an open-source platform, not all the themes available are optimized for the latest versions of WordPress. This is the reason, why you see this error sometimes immediately after a software or version upgrade.
  • Plugin malfunction: When you install multiple plugins on the websites, sometimes they might have conflicting code that leads to site crashes and errors. Other factors like outdated plugins, and custom code modifications can also lead to this error.
  • File permission issue: Incorrect file permissions will also lead to critical errors in WordPress by preventing the server from accessing the respective file. For example, if a wp-content directory or its files are not set to correct permissions, WordPress won't be able to read these files resulting in a critical error.
  • PHP memory limitations: Every WordPress website has a default allocated PHP memory limit. When the website exceeds its allocated memory limit with a sudden increase in traffic it leads to critical error.

Quick fixes for common issues that lead to the 'There has been a critical error on this website' error

Now that you have understood various issues that cause a critical error on WordPress, let us discuss how to fix them.

Step 1

  • First and foremost, check your admin email inbox to find any mail that says the technical issue with your WordPress website from official WordPress. This mail may convey crucial information about what is causing the issue.
  • The mail will also consist of a link to put the website in recovery mode, which provides a safe way to deactivate plugins or themes.

Step 2

  • Websites built using WordPress have built-in debugging tools to find the root cause of these critical errors, WP_DEBUG.
  • To get started, open your wp-config. php file, log in to the FTP account and search for wp-config.php in the root wordpress directory.
  • Now, go to the line in the wp-config file where you can find WP_DEBUG. If it says
    define( 'WP_DEBUG', false );
    , it means it is disabled.
  • Change the function to
    define( 'WP_DEBUG', true );

Step 3

Now, before making any changes to the WordPress core files, take a complete backup of the website. Fixing the issues involves complex steps which can sometimes lead to making other changes, taking a backup ensures that the website is backed up and safe.

Step 4 ( Fixing broken theme files)

  • If you have installed any themes recently, try activating the default theme to fix the broken theme. To do so, go to Appearance and then themes and activate the default theme.
  • Now delete the broken theme and then re-install the theme by clicking on add new under the appearance and themes section.
  • If the issue is still not resolved, then the theme might not be updated or optimized for the current WordPress version. Stick to the default theme and search for new themes.

Step 5 (Fixing plugin malfunctions)

  • To fix the plugin malfunctions, there is only one way. Go to plugins > Installed plugins and deactivate all the plugins.
  • Now reactivate each plugin one by one and each time you activate one, go back to the site and check whether the error still persists. This will help you find the problematic plugin.
  • Now try fixing the plugin by updating, if this doesn't solve the problem simply replace the plugin.

Step 6 ( Fixing file permission issues)

  • To fix the permission issues, use an FTP client like FileZilla to connect to your server and go to the root directory of the WordPress installation.
  • Now set the correct permissions by right-clicking on the folder and selecting the file permissions.
  • Make sure that the numeric value is set to 755 for all the directories and 544 for all the files.
  • Now refresh the website and check whether the issue is resolved.

Step 7 ( PHP memory limitation )

  • When the traffic to your wordpress websites increases, it might lead to PHP memory limitation. To fix this
  • Simply increase the memory limit in wp-config. Php. Edit the wp-config.PHP file located in the root directory of your wordpress installation and this line of code
    define('WP_MEMORY_LIMIT', '256M'); before the /* That's all, stop editing! */ line: Php. 

Why you should prevent this error from occurring?

In summary, a website acts as a platform between the business owner and its customers. It facilitates communication, lead generation, and other functionalities based on the business offerings. As a website owner, you know the importance of serving your customers. This error can result in losing any leads that are trying to visit your website, a communication gap, and prevents any actions that customers want to take. Reducing this downtime is the key to staying connected with your customers and offering a seamless experience. That is why it is very important to fix this issue as soon as possible and prevent it from happening again.