wp_is_https_supported example

'<p>%s</p>',
                        sprintf(
                            /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */
                            __( 'Your <a href="%1$s">WordPress Address</a> and <a href="%2$s">Site Address</a> are not set up to use HTTPS.' ),
                            esc_url( admin_url( 'options-general.php' ) . '#siteurl' ),
                            esc_url( admin_url( 'options-general.php' ) . '#home' )
                        )
                    );
                }
            }

            if ( wp_is_https_supported() ) {
                $result['description'] .= sprintf(
                    '<p>%s</p>',
                    __( 'HTTPS is already supported for your website.' )
                );

                if ( defined( 'WP_HOME' ) || defined( 'WP_SITEURL' ) ) {
                    $result['description'] .= sprintf(
                        '<p>%s</p>',
                        sprintf(
                            /* translators: 1: wp-config.php, 2: WP_HOME, 3: WP_SITEURL */
                            __( 'However, your WordPress Address is currently controlled by a PHP constant and therefore cannot be updated. You need to edit your %1$s and remove or update the definitions of %2$s and %3$s.' ),
                            
if ( ! class_exists( 'WP_Site_Health' ) ) {
    require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
}

if ( 'update_https' === $action ) {
    check_admin_referer( 'wp_update_https' );

    if ( ! current_user_can( 'update_https' ) ) {
        wp_die( __( 'Sorry, you are not allowed to update this site to HTTPS.' ), 403 );
    }

    if ( ! wp_is_https_supported() ) {
        wp_die( __( 'It looks like HTTPS is not supported for your website at this point.' ) );
    }

    $result = wp_update_urls_to_https();

    wp_redirect( add_query_arg( 'https_updated', (int) $resultwp_get_referer() ) );
    exit;
}

$health_check_site_status = WP_Site_Health::get_instance();

Home | Imprint | This part of the site doesn't use cookies.