Make WordPress Core

Opened 13 months ago

Last modified 6 months ago

#55607 new enhancement

wp-config overrides of WP_HOME and WP_SITEURL are forgotten when installing MultiSite.

Reported by: billpg's profile billpg Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: 2nd-opinion
Focuses: multisite Cc:

Description

The chain of events I encountered when playing with WordPress on my home server.

  1. Installed WP successfully.
  2. I changed the two URL settings to the wrong value by accident.
  3. Tried logging back into the admin panel, but I kept being redirected to the wrong place, the one I had mis-typed.
  4. Google'd for a fix that would avoid my having to reinstall from scratch and found you can override these two settings in wp-config. I added the correct values for WP_HOME and WP_SITEURL.
  5. Finding access to my website restored, I forgot about the two settings editable on the setting panel.
  6. I switched on Multi-Site by setting WP_ALLOW_MULTISITE in wp-config.
  7. I followed the Network-Setup panel, opting for subfolders. (The sample code to paste into wp-config had the correct name for DOMAIN_CURRENT_SITE.)
  8. I followed the instructions to update both wp-config and .htaccess.
  9. I went to the login page and saw the page layout was all messed up. Investigating, I found the CSS etc links were all to the mistyped URL I had typed back in step 2.

Note, after restoring the htaccess and wp-config (but keeping my WP_HOME and WP_SITEURL changes) I found I could not update the wrong settings in the DB, as both text boxes were greyed out.

WP multi-site appears to have some reference one of the two URL settings in the database. This should defer to the replacement settings in wp-config.

Change History (1)

#1 @sabernhardt
6 months ago

  • Keywords 2nd-opinion added
  • Type changed from defect (bug) to enhancement
  • Version changed from 5.9.3 to 3.0

Hi and thanks for the report!

This seems to be very similar to #33909. (Close this as a duplicate?)

Changeset [14517] intentionally removed URL filters in multisite to correct the admin URL, and reinstating them probably could break other things now. Supporting the config constants would be an enhancement (see also #57269).

Note: See TracTickets for help on using tickets.