Hacks, InfoHub

There Has Been a Critical Error on Your Website resolved

Like any other technology, you never know when anything may go wrong with your website. A tiny glitch may bring the whole website down, and cause you untold anxiety. As is our custom, we give you simple nontechnical solutions to the ‘There Has Been a Critical Error on Your Website’ error.

What caused the critical error on our end?

First the website was working well and it is an ecommerce WordPress website integrated with WooCommerce. In most cases, an error of website accessibility is caused by incompatibility between various items such as plugins, themes, and even WordPress itself.

The only plugin on the website was WooCommerce, and that made us anxious for a moment, and even almost ruled out the plugin as the culprit.

Resolving the critical error

We started troubleshooting our WordPress website immediately. Here is how we went about it:

1.      Repair database

The first thing we did was repair the database for the website. See this article on a simple way of repairing databases. This usually fixes simple code issues. But in our case, it did not. So, we went to the next step.

2.      Disable plugins

To resolve this error, you must be able to access your backend. This is because once this error occurs, you cannot access your dashboard. In some cases, you may not be able to access your backend (eg, cPanel) and have to contact your host for help.

Once signed in the cPanel, find the plugins folders. Disable them all by renaming. For instance, a plugin reading WooCommerce can be renamed WooCommerce.Now. Once you have renamed all the plugins, try accessing your website from a different tab. If it opens, then one of your plugins is a culprit. In our case we discovered disabling WooCommerce made the website accessible. That meant there was an issue of incompatibility. Remember, the theme can also be a culprit. Just follow the same procedure with themes if the plugins are not to blame.

ALSO READ  The future of facial recognition technology

Since we were now able to log in the website with the plugins disabled, we found out that the PHP version of the website was outdated. There was a warning in the dashboard. Our website was running on Version 7.6 when it should have been on 7.8.

3. Update PHP to the latest version

This solved our problem. We have a detailed process of updating PHP here. We dutifully updated the PHP version to 8.0 step by step.

Then we went back and enable the WooCommerce plugin by renaming it to its correct name. When we refreshed our website in a new tab, it opened with everything intact. Voila!

Sometimes you may need to refresh twice or thrice for the website to ping.

How to disable or rename plugins in WordPress

Renaming plugins will automatically disable them. This should not give you anxiety. Just follow the process below:

  1. Sign into the backend of your website, that is the cPanel.
  2. Scroll down till you see File Manager. Double Click on it.
  3. Scroll down till you see public_html folder. Double Click on it.
  4. This will show all the files in the public_html folder. Scroll till you see the wp-content folder. Double Click on it.
  5. Now you can see several folders such as fonts, cache, plugins, and others. Double Click on plugins folder.
  6. Right click on each plugin and choose ‘Rename’. Just add a dot at the end of the plugin name and a word of your choice to rename. For example, Jetpack can be renamed to Jetpack.Me. This will disable the plugin.
  7. Now start naming your plugins to their correct names while refreshing your website in a different tab each time. You will discover the offending plugin, which you should disable it for good.
  8. Once you have resolved your issue, you can always change back the names of your plugins to the original names.