Opened 3 years ago
Last modified 2 years ago
#55607 new enhancement
wp-config overrides of WP_HOME and WP_SITEURL are forgotten when installing MultiSite.
Reported by: | 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.
- Installed WP successfully.
- I changed the two URL settings to the wrong value by accident.
- Tried logging back into the admin panel, but I kept being redirected to the wrong place, the one I had mis-typed.
- 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.
- Finding access to my website restored, I forgot about the two settings editable on the setting panel.
- I switched on Multi-Site by setting WP_ALLOW_MULTISITE in wp-config.
- 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.)
- I followed the instructions to update both wp-config and .htaccess.
- 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)
Note: See
TracTickets for help on using
tickets.
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).