Changing your domain is one of those jobs that looks like a single setting and turns out to touch everything. WordPress stores your site address in the database thousands of times: in links inside posts, in image paths, in widget settings and theme options. Miss some and you get broken images; break serialized data and whole widgets disappear.
Here's how to do it cleanly, keep your search rankings, and leave yourself a way back.
Why "Settings → General" isn't enough
Changing the WordPress Address and Site Address in Settings only updates two values. Every link and image you inserted into posts still points at the old domain. And many plugins store settings as serialized data, where the length of each piece of text is recorded alongside it. A plain search-and-replace changes the text but not the length, and the setting silently breaks.
The safe way: restore onto the new domain
The cleanest approach is to treat a domain change like a migration:
- Back up the site on the old domain with Movebase → Backups → Create backup.
- Set up WordPress on the new domain. This can be on the same hosting account (as an add-on domain) or a new one.
- Install Movebase on the new site and open Movebase → Restore.
- Bring the backup over by upload, File Manager or cloud storage.
- Confirm the new address when Movebase asks. It restores the site and rewrites the address everywhere it appears, including inside serialized data and the variations a site collects over time:
httpandhttps, with and withoutwww.
Your old site keeps running the whole time, and the new site's previous state is kept as a recovery copy.
Keep your rankings: 301 redirects
Search engines and visitors still know your old address. A 301 (permanent) redirect sends every old URL to the same path on the new domain, and passes most of the ranking with it.
The simplest way is at the old domain itself:
- In Cloudflare: add a redirect rule that sends
olddomain.com/*tohttps://newdomain.com/${1}with status 301. - On Apache hosting: add a rule to the old site's
.htaccess:
RewriteEngine On
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Keep the old domain registered and redirecting for at least a year. If you let it expire, someone else can buy it and the redirects (and the trust they carry) are gone.
Tell Google about the move
- Add and verify the new domain in Google Search Console.
- In the old domain's Search Console property, open Settings → Change of address and pick the new domain.
- Submit the new site's sitemap.
Bing Webmaster Tools has a similar "Site Move" tool.
Things people forget
- Email addresses on the old domain (
[email protected]) don't move by themselves. - Payment and webhook URLs in Stripe, PayPal or WooCommerce gateways that contain the old domain.
- Google Analytics and ad accounts, which may be set to the old domain.
- Hard-coded links in your theme files, which a database restore can't see. Search your child theme for the old domain.
- Your social profiles and email signatures.
A word on timing
Rankings usually dip briefly after a domain change and recover within weeks if every old URL redirects to its exact new equivalent. Redirecting everything to the home page instead loses most of that value, so match paths one to one.
Want the full migration checklist? Read how to migrate WordPress to a new host and the migration guide.
