Why Would You Migrate WordPress to a New Domain?
Common reasons for a domain change include:
- Rebranding — your business name or focus has changed
- Upgrading from a
.netor unusual TLD to a.com - Merging two sites into one domain
- Moving from a subdomain (
blog.example.com) to a root domain - Correcting an early domain choice that no longer fits
Whatever the reason, the technical process is the same.
Before You Start: Important Prep Steps
A domain migration affects your entire site, so preparation matters.
1. Take a full backup Back up your WordPress files and database before changing anything. This is your safety net if something goes wrong.
2. Set up your new domain Register your new domain and point it to your hosting account. Make sure it resolves correctly before proceeding.
3. Lower your DNS TTL If possible, reduce your domain's TTL (Time To Live) to 300 seconds (5 minutes) a day before migrating. This makes DNS propagation faster when you're ready to switch.
4. Notify Google You'll submit a change of address in Google Search Console after the migration — have access to both the old and new domain properties ready.
Step 1: Install WordPress on the New Domain (If Needed)
If your new domain is on a different host or a fresh install, set up WordPress there first. If you're just changing the domain on your existing hosting account, you can often skip this step and simply update the domain settings.
On Cloudways, you can add a new domain to an existing application directly from the dashboard under Application Management → Domain Management.
Step 2: Update WordPress URLs in the Database
WordPress stores your domain name in the database — in the wp_options table and throughout your content. This needs to be updated to reflect your new domain.
The safest way: use a plugin
The Better Search Replace plugin handles this cleanly and safely:
- Install and activate Better Search Replace on your site
- Go to Tools → Better Search Replace
- In the "Search for" field, enter your old domain (e.g.,
https://olddomain.com) - In the "Replace with" field, enter your new domain (e.g.,
https://newdomain.com) - Select all tables
- Run a dry run first to preview changes, then run the actual replacement
Via WP-CLI (for developers):
wp search-replace 'https://olddomain.com' 'https://newdomain.com' --all-tables
Manually via phpMyAdmin: In the <strong>wp_options</strong> table, update the <strong>siteurl</strong> and <strong>home</strong> values to your new domain. This is a manual option but doesn't catch URLs throughout your content.
Step 3: Update Your WordPress Settings
After the database update, verify your URLs are correct:
- Go to Settings → General
- Confirm WordPress Address (URL) and Site Address (URL) both show your new domain
- Save Changes
Step 4: Update Your wp-config.php (Optional but Recommended)
For extra reliability, you can hardcode your domain in <strong>wp-config.php</strong>:
php
define('WP_HOME', 'https://newdomain.com'); define('WP_SITEURL', 'https://newdomain.com');
This overrides the database settings and ensures WordPress always uses the correct domain.
Step 5: Set Up SSL on the New Domain
Make sure your SSL certificate covers your new domain. On most managed hosts, free Let's Encrypt certificates can be issued with one click.
On Cloudways, go to Application → SSL Certificate and add your new domain.
Step 6: Set Up 301 Redirects from Old Domain to New Domain
This is the most important step for SEO. A 301 redirect tells search engines that your content has permanently moved, passing your existing rankings to the new domain.
If your old domain is on a different host: Add 301 redirects via the <strong>.htaccess</strong> file on the old server:
RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain\.com [NC] RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301]
If both domains are on the same host: Use a redirect plugin like Redirection to set up domain-level redirects, or configure it through your hosting dashboard.
Keep these redirects in place permanently — don't remove them after a few weeks. Search engines can take months to fully transfer ranking signals.
Step 7: Update Google Search Console
- Add your new domain as a property in Google Search Console
- Verify ownership
- Go to your old domain property and use the Change of Address tool (Settings → Change of Address)
- Select your new domain and submit
This notifies Google of the intentional domain change and helps accelerate the transfer of ranking signals.
Step 8: Update Your Sitemap and Resubmit
Generate a fresh sitemap that reflects your new domain URLs and submit it to Google Search Console under your new domain property. This helps Google crawl and index your content at the new location faster.
Step 9: Update External Links and Profiles
Where possible, update links pointing to your old domain:
- Your social media profiles and bios
- Google Business Profile
- Directory listings and citations
- Email signatures and marketing materials
- Any backlinks you have direct control over
You can't update every backlink, which is why the 301 redirects are so important — they'll handle the traffic and SEO value from links you can't change.
What to Expect After the Migration
SEO ranking fluctuations after a domain migration are normal. You may see a temporary dip in rankings as Google processes the change. This typically stabilizes within a few weeks to a couple of months, assuming the 301 redirects are properly in place.
Monitor your rankings and organic traffic in the weeks following migration. If you see an ongoing decline rather than a recovery, double-check your redirects and make sure Google Search Console is correctly configured.
Moving to a New Host at the Same Time?
If you're changing your domain and your host at the same time, it's generally easier to do both in one migration. Cloudways migrates your first WordPress site for free — their team handles the transfer, including getting everything set up on the new domain correctly.