How to Change WordPress Domain URL Safely
Updating the site URL requires careful database search-and-replace operations and proper SSL configuration to avoid broken links and redirect loops.
Based on 7 community reports.
Linked sources: 7.
Known Issues
- Broken image links after migration
- SSL certificate errors
- Redirect loops
- Database path mismatches
Community Q&A
How do I change my WordPress site URL?
You can update the site URL in the WordPress settings, via the wp-config.php file, or by using a search-and-replace plugin to update the database.
Why are my images broken after changing my domain?
Images often break because the database still contains hardcoded references to the old domain URL; use a search-and-replace tool to fix these paths.
Do I need to keep the old domain active after a move?
Yes, it is recommended to keep the old site active with 301 redirects for a few weeks to ensure search engines and users transition correctly.
How do I fix SSL issues after changing my domain?
Ensure your SSL certificate is reissued for the new domain and check your wp-config.php settings to force HTTPS connections.
Reddit Sources
- Do I keep the site with the old brand name parent URL alive, or not? (r/webdev)
- Migrating 3.100 URLS from a 14 year old Wordpress site - fear and loathing in Redirect spreadsheet (r/webdev)
- How does SSL work with redirected blog? (r/webdev)
- How to have sub pages with unique URLs on my site? (r/webdev)
- How can I fix my broken images after migrating WordPress website? (I know the problem, just not how to fix it) (r/webdev)
- Help needed in moving WordPress website URL (r/webdev)
- How do I deploy a Django App on a hosting service? (r/webdev)