wordpress / latest / classes / wpdb / check_database_version.html

wpdb::check_database_version(): void|WP_Error

Determines whether MySQL database is at least the required minimum version.

Return

void|WP_Error

Source

File: wp-includes/class-wpdb.php. View all references

public function check_database_version() {
	global $wp_version, $required_mysql_version;
	// Make sure the server has the required MySQL version.
	if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
		/* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
		return new WP_Error( 'database_version', sprintf( __( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) );
	}
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
2.5.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/check_database_version