diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 2714f613f2..ae65905554 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -10,13 +10,14 @@ class WP_Site_Health { private static $instance = null; - private $mysql_min_version_check; - private $mysql_rec_version_check; + private $is_acceptable_mysql_version; + private $is_recommended_mysql_version; - public $is_mariadb = false; - private $mysql_server_version = ''; - private $health_check_mysql_required_version = '5.5'; - private $health_check_mysql_rec_version = ''; + public $is_mariadb = false; + private $mysql_server_version = ''; + private $mysql_required_version = '5.5'; + private $mysql_recommended_version = '5.7'; + private $mariadb_recommended_version = '10.3'; public $php_memory_limit; @@ -209,15 +210,13 @@ class WP_Site_Health { $this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' ); - $this->health_check_mysql_rec_version = '5.6'; - if ( stristr( $mysql_server_type, 'mariadb' ) ) { - $this->is_mariadb = true; - $this->health_check_mysql_rec_version = '10.0'; + $this->is_mariadb = true; + $this->mysql_recommended_version = $this->mariadb_recommended_version; } - $this->mysql_min_version_check = version_compare( '5.5', $this->mysql_server_version, '<=' ); - $this->mysql_rec_version_check = version_compare( $this->health_check_mysql_rec_version, $this->mysql_server_version, '<=' ); + $this->is_acceptable_mysql_version = version_compare( $this->mysql_required_version, $this->mysql_server_version, '<=' ); + $this->is_recommended_mysql_version = version_compare( $this->mysql_recommended_version, $this->mysql_server_version, '<=' ); } /** @@ -1197,7 +1196,7 @@ class WP_Site_Health { $db_dropin = file_exists( WP_CONTENT_DIR . '/db.php' ); - if ( ! $this->mysql_rec_version_check ) { + if ( ! $this->is_recommended_mysql_version ) { $result['status'] = 'recommended'; $result['label'] = __( 'Outdated SQL server' ); @@ -1208,12 +1207,12 @@ class WP_Site_Health { /* translators: 1: The database engine in use (MySQL or MariaDB). 2: Database server recommended version number. */ __( 'For optimal performance and security reasons, you should consider running %1$s version %2$s or higher. Contact your web hosting company to correct this.' ), ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), - $this->health_check_mysql_rec_version + $this->mysql_recommended_version ) ); } - if ( ! $this->mysql_min_version_check ) { + if ( ! $this->is_acceptable_mysql_version ) { $result['status'] = 'critical'; $result['label'] = __( 'Severely outdated SQL server' ); @@ -1225,7 +1224,7 @@ class WP_Site_Health { /* translators: 1: The database engine in use (MySQL or MariaDB). 2: Database server minimum version number. */ __( 'WordPress requires %1$s version %2$s or higher. Contact your web hosting company to correct this.' ), ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), - $this->health_check_mysql_required_version + $this->mysql_required_version ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index ae58d03719..a979c16fe0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54068'; +$wp_version = '6.1-alpha-54069'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.