Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 2 years ago

#49210 closed defect (bug) (duplicate)

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

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

Description

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
7 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → 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.