define('RELOCATE', true) update the "siteurl" option, but not the "home" option
|Reported by:||mintindeed||Owned by:|
define('RELOCATE', true) will update the "siteurl" option, but not the "home" option.
Things like the_permalink() use home_url(), which uses the "home" option, so URLs break after using RELOCATE. Post permalinks, "Visit Site" in the admin, etc, all point to the old domain.
Steps to reproduce: set up a blog at one domain, say "http://example.com" and then use RELOCATE to relocate the blog to "http://example.local". Links in the admin will work, but "Visit Site" in the admin bar will point to the old domain. Likewise, permalinks and other links on the frontend of the site will also still point to the old domain.
Is this by design?
I'm attaching a patch that also updates the "home" option when using RELOCATE.
Change History (10)
comment:7 SergeyBiryukov — 20 months ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
comment:8 SergeyBiryukov — 20 months ago
- Resolution worksforme deleted
- Status changed from closed to reopened