[wp-trac] [WordPress Trac] #35912: Allow changing network URL scheme

WordPress Trac noreply at wordpress.org
Thu Feb 25 03:03:32 UTC 2016


#35912: Allow changing network URL scheme
-----------------------------------+------------------------------
 Reporter:  rmccue                 |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Networks and Sites     |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  multisite
-----------------------------------+------------------------------

Comment (by jeremyfelt):

 In general, I think we should allow the address of the main site to be
 changed as we do with non-main sites. There are sticky situations to think
 through. :)

 * In `site-info.php`, scheme is already a guess because we don't track it
 in `wp_blogs` yet use the `domain` and `path` from `wp_blogs` to populate
 the (now in trunk) "Site Address (URL)" field. We use the scheme attached
 to the site's `siteurl` option as our best guess.
 * When updating the address from `site-info.php` on a non-main site, we
 change the `siteurl` and/or the `home` options **IF** the previously set
 `domain` and `path` matched exactly. We then overwrite whatever the scheme
 was with the one entered manually in the text field.
 * Therefore... if we allow only the scheme to be updated on the main
 site's `site-info.php`, we would only be able to correctly guess that the
 scheme should be updated for `siteurl` or `home` if `domain` and `path`
 are an exact match.

 We've had some brief discussions around tracking scheme in `wp_blogs` more
 officially so that we wouldn't have to rely on `home` and `siteurl`. One
 of [https://wordpress.slack.com/archives/core-http/p1443732323000360 the
 concerns] was essentially how those options can already be filtered, so
 setting the scheme separately just moves the problem around a bit.

 I guess the short version IMO: If we're going to allow scheme to be
 updated in this field, we should just treat the main site the same as
 other sites in `site-info.php`.

 To the secondary point - I don't think we would ever have enough
 information here to be able to change the scheme network wide in a
 subdomain installation. It's possible that we could in a subdirectory
 installation, though how do you enforce that with `home` and `siteurl` set
 separately for all #### sites in the network?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35912#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list