Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#49210 closed defect (bug) (duplicate)

Multisite: home and siteurl options always use the http scheme in subdomain installs

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords:
Focuses: multisite Cc:


In wp_initialize_site():

	$home_scheme    = 'http';
	$siteurl_scheme = 'http';
	if ( ! is_subdomain_install() ) {
		if ( 'https' === parse_url( get_home_url( $network->site_id ), PHP_URL_SCHEME ) ) {
			$home_scheme = 'https';
		if ( 'https' === parse_url( get_network_option( $network->id, 'siteurl' ), PHP_URL_SCHEME ) ) {
			$siteurl_scheme = 'https';
        // home and siteurl options are populated next

This results in http being used as the scheme in home and siteurl option values for subsites

Change History (1)

#1 @johnbillion
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report Henry. This is intentional, to avoid a new site being inaccessible due to lack of a certificate. See #27499, #33620.

Note: See TracTickets for help on using tickets.