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 Critical Error on Your Website problem.
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.
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 hierarchically. If you are on version 5.4, you MUST NOT update to 7.2 directly. Update to the next version, step by step, until you get to the most immediate release.
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! No more Critical Error On Your Website issues.
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:
- Sign into the backend of your website, that is the cPanel.
- Scroll down till you see File Manager. Double Click on it.
- Scroll down till you see public_html folder. Double Click on it.
- This will show all the files in the public_html folder. Scroll till you see the wp-content folder. Double Click on it.
- Now you can see several folders such as fonts, cache, plugins, and others. Double Click on plugins folder.
- 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.
- 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.
- Once you have resolved your issue, you can always change back the names of your plugins to the original names.
Many times, plugin updates cause incompatibility and the Critical Error on Your Website situation. Before installing an update, check what the update is first. Also make sure you have ready access to your cPanel File Manager just in case something breaks down and you need to restore your website quickly as you resolve.