use_mysqli ) { $mysql_server_type = mysqli_get_server_info( $wpdb->dbh ); } else { $mysql_server_type = mysql_get_server_info( $wpdb->dbh ); } $mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' ); } $health_check_mysql_rec_version = HEALTH_CHECK_MYSQL_REC_VERSION; if ( stristr( $mysql_server_type, 'mariadb' ) ) { $mariadb = true; $health_check_mysql_rec_version = '10.0'; } $mysql_min_version_check = version_compare( HEALTH_CHECK_MYSQL_MIN_VERSION, $mysql_server_version, '<=' ); $mysql_rec_version_check = version_compare( $health_check_mysql_rec_version, $mysql_server_version, '<=' ); $json_check = HealthCheck::json_check(); $db_dropin = file_exists( WP_CONTENT_DIR . '/db.php' ); ?>
|
%s',
esc_url(
_x( 'https://wordpress.org/support/upgrade-php/', 'The link to the Update PHP page, which may be localized.', 'health-check' )
),
sprintf(
// translators: %s: Recommended PHP version
esc_html__( 'For performance and security reasons, we strongly recommend running PHP version %s or higher.', 'health-check' ),
HEALTH_CHECK_PHP_REC_VERSION
)
);
}
if ( ! $php_supported_version_check ) {
$status = 'warning';
$notice[] = sprintf(
'%s',
esc_url(
_x( 'https://wordpress.org/support/upgrade-php/', 'The link to the Update PHP page, which may be localized.', 'health-check' )
),
sprintf(
// translators: %1$s: Current PHP version. %2$s: Recommended PHP version.
esc_html__( 'Your version of PHP, %1$s, is very outdated and no longer receiving security updates. You should contact your host for an upgrade, WordPress recommends using PHP version %2$s.', 'health-check' ),
PHP_VERSION,
HEALTH_CHECK_PHP_REC_VERSION
)
);
}
if ( ! $php_min_version_check ) {
$status = 'error';
$notice[] = sprintf(
'%s',
esc_url(
_x( 'https://wordpress.org/support/upgrade-php/', 'The link to the Update PHP page, which may be localized.', 'health-check' )
),
sprintf(
// translators: %1$s: Current PHP version. %2$s: Recommended PHP version. %3$s: Minimum PHP version.
esc_html__( 'Your version of PHP, %1$s, is very outdated and no longer receiving security updates and is not supported by WordPress. You should contact your host for an upgrade, WordPress recommends using PHP version %2$s, but will work with version %3$s or newer.', 'health-check' ),
PHP_VERSION,
HEALTH_CHECK_PHP_REC_VERSION,
HEALTH_CHECK_PHP_MIN_VERSION
)
);
}
printf(
' %s',
esc_attr( $status ),
sprintf(
'%s%s',
PHP_VERSION,
( ! empty( $notice ) ? ' - ' . implode( ' ', $notice ) : '' ) ) ); ?> |
|
|
wp-content/db.php drop-in which might mean that a %s database is not being used.', 'health-check' ), ( $mariadb ? 'MariaDB' : 'MySQL' ) ), array( 'code' => true ) );
}
printf(
' %s',
esc_attr( $status ),
sprintf(
'%s%s',
esc_html( $mysql_server_version ),
( ! empty( $notice ) ? ' - ' . implode( ' ', $notice ) : '' ) ) ); ?> |
|
| %s', esc_html__( 'The PHP install on your server has the JSON extension disabled and is therefore not compatible with WordPress 3.2 or newer.', 'health-check' ) ); } else { printf( ' %s', esc_html__( 'Your PHP install supports JSON.', 'health-check' ) ); } ?> | |
|
%s',
sprintf(
/* translators: %s: Number of version. */
esc_html__( 'WordPress\' utf8mb4 support requires MySQL version %s or greater', 'health-check' ),
'5.5.3'
)
);
} else {
printf(
' %s',
esc_html__( 'Your MySQL version supports utf8mb4', 'health-check' )
);
}
} else { // MariaDB introduced utf8mb4 support in 5.5.0
if ( version_compare( $mysql_server_version, '5.5.0', '<' ) ) {
printf(
' %s',
sprintf(
/* translators: %s: Number of version. */
esc_html__( 'WordPress\' utf8mb4 support requires MariaDB version %s or greater', 'health-check' ),
'5.5.0'
)
);
} else {
printf(
' %s',
esc_html__( 'Your MariaDB version supports utf8mb4', 'health-check' )
);
}
}
if ( $wpdb->use_mysqli ) {
$mysql_client_version = mysqli_get_client_info();
} else {
$mysql_client_version = mysql_get_client_info();
}
/*
* libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server.
* mysqlnd has supported utf8mb4 since 5.0.9.
*/
if ( false !== strpos( $mysql_client_version, 'mysqlnd' ) ) {
$mysql_client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $mysql_client_version );
if ( version_compare( $mysql_client_version, '5.0.9', '<' ) ) {
printf(
' %s', sprintf( /* translators: %1$s: Name of the library, %2$s: Number of version. */ __( 'WordPress\' utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer.', 'health-check' ), 'mysqlnd', '5.0.9' ) ); } } else { if ( version_compare( $mysql_client_version, '5.5.3', '<' ) ) { printf( ' %s', sprintf( /* translators: %1$s: Name of the library, %2$s: Number of version. */ __( 'WordPress\' utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer.', 'health-check' ), 'libmysql', '5.5.3' ) ); } } ?> |
|
| 10 ) ); if ( ! is_wp_error( $wp_dotorg ) ) { printf( ' %s', esc_html__( 'WordPress.org is reachable from your server.', 'health-check' ) ); } else { printf( ' %s', sprintf( // translators: %1$s: The IP address WordPress.org resolves to. %2$s: The error returned by the lookup. __( 'Unable to reach WordPress.org at %1$s: %2$s', 'health-check' ), gethostbyname( 'wordpress.org' ), $wp_dotorg->get_error_message() ) ); } ?> | |
| %s', esc_html__( 'You are accessing this website using HTTPS.', 'health-check' ) ); } else { printf( ' %s', esc_html__( 'You are not using HTTPS to access this website.', 'health-check' ) ); } ?> | |
| %s', esc_html__( 'Your WordPress install can communicate securely with other services.', 'health-check' ) ); } else { printf( ' %s', esc_html__( 'Your WordPress install cannot communicate securely with other services. Talk to your web host about OpenSSL support for PHP.', 'health-check' ) ); } ?> | |
| %s', sprintf( // translators: %1$s: Current cURL version number. %2$s: Recommended minimum cURL version. esc_html__( 'Your version of cURL, %1$s, is lower than the recommended minimum version of %2$s. Your site may experience connection problems with other services and WordPress.org', 'health-check' ), $cURL['version'], HEALTH_CHECK_CURL_MIN_VERSION ) ); } elseif ( version_compare( $cURL['version'], HEALTH_CHECK_CURL_VERSION, '<' ) ) { printf( ' %s', sprintf( // translators: %1$s: cURL version number running on the website. %2$s: The currently available cURL version. esc_html__( 'Your version of cURL, %1$s, is slightly out of date. The most recent version is %2$s. This may in some cases affect your sites ability to communicate with other services. If you are experiencing connectivity issues connecting to various services, please contact your host.', 'health-check' ), $cURL['version'], HEALTH_CHECK_CURL_VERSION ) ); } else { printf( ' %s', sprintf( // translators: %s: cURL version number. esc_html__( 'Your version of cURL, %s, is up to date.', 'health-check' ), $cURL['version'] ) ); } ?> | |
| has_missed_cron() ) ) { printf( ' %s', esc_html( $scheduled_events->has_missed_cron()->get_error_message() ) ); } else { if ( $scheduled_events->has_missed_cron() ) { printf( ' %s', sprintf( // translators: %s: The name of the failed cron event. esc_html__( 'A scheduled event (%s) has failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.', 'health-check' ), $scheduled_events->last_missed_cron ) ); } else { printf( ' %s', esc_html__( 'No scheduled events have been missed.', 'health-check' ) ); } } ?> | |
|
|
|
%s',
esc_attr( $check_loopback->status ),
esc_html( $check_loopback->message )
);
if ( 'error' === $check_loopback->status ) {
echo ' '; } ?> |