WordPress Critical Error on This Website Fix

WordPress Critical Error on This Website Fix

Published: August 22, 2023 Author: JasonDarkX2  Category: Tech,Tutorials

A quick fix for WordPress site stuck on a critical error on this website message. When attempting to login to Admin Dashboard. The fix is relatively simple If your error message looks like this:

and the URL gets stuck on something like this:


If these are the symptoms, then it's most likely a db_version mismatch. With your currently installed WordPress version with the one listed in the database.

Step One- Compare your WordPress versions

To check the current installed WordPress version simply head over to wp-includes directory and open version.php the number you should be looking for would labeled as $wp_db_version=[version number].
Where as in your database, you can simply use the following SQL statement
mysql>SELECT * FROM `wp_options` where option_name = 'db_version';
The version number would under the option_value column.

Step Two - Update the db_version

If there's a mismatch, update the version number in the database with the one you found in the version.php of your WordPress installation. With the following SQL command:
mysql>UPDATE wp_options SET  option_value= '[version number]' WHERE option_name = 'db_version';

If update statement succeeded, simply refresh the page and you should be able to login successfully. Otherwise if the version are correct, and the error persist. You'll have go through the routine WordPress trouble shooting. Which consists of disabling plugins and/or reinstalling WordPress.

Since you don't have access to the plugin dashboard. Using FTP to delete plugins and/or renaming the directory might be risky, if you're unsure which plugin is vital. I'd recommend to just disabling all of them through SQL. As the first step to troubleshoot a WordPress site. To disable WordPress plugins using SQL commands:

mysql>UPDATE wp_options SET  option_value=''  WHERE option_name ='active_plugins';

Cheers that's all folk 😛
Tags:Quick Fixes, WordPress, WordPress fixes
No comments