Check WordPress Version in a MySQL database

Should be in wp_options table, the field is called db_version. So, yes, it’s possible.

You can run this SQL command (substitute your table name if different):

SELECT * FROM `wp_options` where option_name="db_version"

Make sure to consult the codex, as the db_version looks different from the wp version. for instance:

For Version 3.1, the database version (db_version in wp_options)
changed to 17056, and the Trac revision was 17485.

See https://codex.wordpress.org/WordPress_Versions for a cross reference of db_version (database version) to WordPress release.

Alternatively, you can find the file in the WordPress installation, inside the folder “wp-incudes”. The file is called version.php and defines a global variable like so:

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '3.7.1';

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)