How to fix “Critical Error” WordPress Message
After an update to a WordPress plugin or theme has failed, you may see a “Critical Error” message on your website. To fix this error, we must first understand what is causing it.
Determining what is causing the problem
To determine the cause of the problem, we have to enable WP_DEBUG mode. To do this, login to the online file manager, and navigate to your WordPress instance (Either the /htdocs folder, or /<domain-name/htdocs). Locate the “wp-config.php” file and open it in “editor” mode.
Locate the line that defines WP_DEBUG (Around Line 82), and change “false” to “true”. Save and close the file, then reload your website, information should appear at the top of the page. Important: When you find the error, make sure to disable WP_DEBUG mode, as it can display sensitive information about your website.
Deleting a broken plugin
If you have determined the cause of the error to be a broken plugin, we can remove the plugin from your website (Then you can reinstall it later). To do this, first login over FTP (Don’t use the online file manager for this, as it is not suitable for these types of actions).
Next, navigate to the /wp-content/plugins folder (It will be located within your domain's root folder, /htdocs or /domainname.com/htdocs), and locate the plugin you wish to remove. Right click, and select delete.
After the action is complete, login to your WP-Admin dashboard. If it does not work, see the section above.
Removing a broken theme
Removing a broken theme must be done from the database instead of the file manager. Access the control panel, select “PHPMyAdmin”, and choose the database for your WordPress installation.
Once PHPMyAdmin loads, select the table that ends in “_options”. The part before the underscore will be different for each user. When the table loads, select “Search” at the top of the screen (With the magnifying glass icon).
In the search menu, enter the word “template” in the “option_name” row, and click “Search”. When the search is complete, click on the entry that contains the theme name, and replace it with the default theme (“twentytwentytwo” for example).
After the action is complete, login to your WP-Admin dashboard. If it does not work, see the section above. If changing the theme worked, use the WP-Admin dashboard to reinstall the chosen theme. You can also install the theme manually.
Can I re-install the plugin or theme?
Sure! If you fixed the issue, feel free to reinstall the plugin to theme using the WP-Admin interface, or over FTP/PHPMyAdmin.