There will be times when your site will have a plugin conflict, a plugin causing an issue, or something in the active theme preventing your site from loading. If an error is detected then WordPress will send an email with the critical error to the site admin's email which will allow you to be able to login to your site and find the plugin that is causing the issue.
There has been a critical error on your website. Please check your site admin email inbox for instructions.
First, you will need to enable debugging on the site. To be able to do this you will need to have your SSH credentials for your site login using your SSH client of choice and then edit the sites wp-config.php file.
Set the following in your sites wp-config.php file.
It is possible to set the debug constants using WP-CLI commands.
Now refresh your site and you should see errors being displayed by the plugin or theme which is causing the issue.
With debug, log enabled you will be able to access it from the wp-content folder unless you define a different path in the constant.
To get a list of all of your active plugins using a WP-CLI command you can run;
Once you find the plugin causing the issue to deactivate that plugin using the plugin slug in the WP-CLI command. In this example, we are going to just deactivate the Classic Editor plugin.
If you needed to deactivate all of the plugins then activate the plugins back in order to find the plugin conflict you can run this WP-CLI command.
If you found the issue was being caused by the theme you can activate one of the default themes which are provided. In this example, we are going to activate the Twenty Twenty theme using a WP-CLI command.
Before changing the theme since widget areas might be replaced from the currently active theme that is being used on the site it would be recommended to back up the site database using this WP-CLI command.
You can activate the previous theme using the wp theme activate WP-CLI command but include the theme slug out.
To get a list of your themes that are inactive you can run the following WP-CLI command.
If you know the plugin that was recently updated and that update caused the issue then you can revert that plugin version using a WP-CLI command.
Another way to update a plugin to a specific version would be by using this WP-CLI command.
These will give you steps you need to find plugin issues, plugin conflict issues or activate theme issues. Along with how to deactivate an active theme, rollback a plugin or revert the site to a specific theme. This will allow you to be able to fix critical errors on your site.
Remember to set the debug constants to false when you have finished checking and fixing critical errors on your site.
For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.