Opened 20 months ago
Last modified 12 months ago
#18769 new enhancement
Admin should not break if URL changes
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | olleicua@…, mike.schroder@… |
Description (last modified by nacin)
We manage a lot of users who have WordPress blogs, and probably the number one user support request we have to field comes out of this situation:
- User decides they want to move their WordPress,
- They move the folder to a new URL,
- Their admin page stops working, because it still had the old URL hard-coded.
This is silly and should be fixed.
Change History (6)
I don't mind the main site breaking; most users will notice that their CSS has completely broken. What I object to is breaking the admin panel, especially for users who are not comfortable editing source code.
As for why no one has reported this, I suspect people who will be confused by this are also more likely to be people posting in the support forums, not the bug tracker.
- Cc olleicua@… added
I agree with AmbushCommander here. As someone who has had to consult this page
a few times, I would love for the process to be simpler. The main issue is that there is no way to avoid there being a period where you cannot access the admin.
One serious issue with this is for example if I'm moving my site from http://example.com to http://example2.com, and I misspelled example2 when I changed the site url then I will have to find the record in the db. I recognize it's a corner case but there is always a moment where you have to hold your breath and hope it works. It seems like it should be possible to override the redirect here so that it checks to see if a wordpress installation exists at the new url (for example with a simple file_get_contents call) and use the old url if not.
At any rate I'd love to take this on. Thoughts?
comment:5
SergeyBiryukov — 12 months ago
comment:6
DH-Shredder — 12 months ago
- Cc mike.schroder@… added

There is a RELOCATE constant that can be set, which will allow wp-login.php to work, and upon login the siteurl setting will be updated.
We can potentially handle this more gracefully, by not requiring the constant and having some sort of migration step/warning. But do we want that? Seems pretty rare/edge to be honest (possibly the first bug report I've seen on this specifically). And then there's the issue with old URLs breaking, so it's not like we'd want to encourage migrations as we won't be able to handle the old URLs.