Overview
Moving a WordPress site to a new domain involves more than just changing the address — WordPress stores the site URL in the database, and many links, image references, and settings are tied to the original domain. Skipping the right steps leads to broken images, login redirects back to the old domain, and mixed-content SSL warnings.
This article walks through the full process: preparing the new domain, updating the database correctly, and handling SEO and redirects so your visitors and search rankings aren't disrupted.
Before You Start: Checklist
- You own and control both the old and new domains.
- The new domain is added to your hosting account (or you're using the same account for both).
- DNS for the new domain is pointing to your hosting server (or is ready to be pointed).
- You have a recent, complete backup of your WordPress site.
- You know your WordPress admin login and database credentials.
Take a full backup before starting. This is non-negotiable. If anything goes wrong, you'll need it. Use a plugin like UpdraftPlus, or the backup tool in cPanel/DirectAdmin, and download the backup to your local computer.
Decide Your Migration Scenario
There are two main scenarios, and the steps differ slightly:
Scenario A: Same Hosting Account, New Domain
The files and database stay put — you just point a new domain at the same WordPress installation and update the URLs.
Scenario B: New Hosting Account or Server
You're moving the site files and database to a new location as well as changing the domain.
This article covers Scenario A in detail, with notes on additional steps for Scenario B.
Step 1: Add the New Domain to Your Hosting
In cPanel
- Log in to cPanel.
- Search for Domains and click the result.
- Click Create A New Domain.
- Enter the new domain name.
- Important: Set the document root to the same folder as your existing WordPress site (e.g.,
public_html/) — NOT a new subfolder.
- Save.
The new domain now serves the same WordPress installation as your old domain.
In DirectAdmin
- Log in to DirectAdmin.
- Go to Domain Setup and click Add New Domain.
- Enter the new domain.
- After creation, you'll need to either:
- Change the document root to point to your existing site, OR
- Copy the site files into the new domain's folder (see Step 2 below for file moves).
DirectAdmin's per-domain folder structure means this step is slightly more involved than cPanel. Contact support if you're unsure which approach fits your situation.
Step 2: Point DNS for the New Domain
If the new domain's DNS isn't already pointing to your hosting server:
- Log in to wherever the new domain's DNS is managed (your registrar or DNS provider).
- Update the A record for
@ (root) and www to point to your hosting server's IP address (shown in your welcome email or control panel).
- Wait for propagation — usually 15–60 minutes, occasionally up to a few hours.
Verify propagation by visiting the new domain in a browser. You should see your WordPress site (possibly with broken images — that's fine, we'll fix that next).
Step 3: Issue an SSL Certificate for the New Domain
Before updating URLs, make sure the new domain has a valid SSL certificate. Otherwise, you'll flip the site to HTTPS and immediately break it.
cPanel (AutoSSL)
- Search for SSL/TLS Status.
- Find the new domain in the list.
- Click Run AutoSSL — or wait for the automatic run (usually within 24 hours).
- Once the lock icon appears green, SSL is ready.
DirectAdmin (Let's Encrypt)
- Go to Domain Setup → new domain → SSL Certificates.
- Select Free & automatic certificate from Let's Encrypt.
- Check all the hostnames you want covered (root, www, etc.).
- Save.
Don't proceed until SSL is working on the new domain. Test by visiting https://newdomain.com — you should see your site (likely with broken images or redirects back to the old domain, which we'll fix next).
Step 4: Update WordPress URLs
This is the core step. WordPress stores the site URL in multiple places — not just one setting. You need to update all of them.
Method 1: Better Search Replace Plugin (Recommended)
This is the safest method for most users.
- Log in to your WordPress admin at the old domain (e.g.,
olddomain.com/wp-admin).
- Go to Plugins → Add New.
- Search for Better Search Replace and install/activate it.
- Go to Tools → Better Search Replace.
- In the Search for field, enter:
https://olddomain.com
- In the Replace with field, enter:
https://newdomain.com
- Select all tables in the list.
- Critical: Check the box Run as dry run? first.
- Click Run Search/Replace.
- Review the dry run results — it'll show how many changes would be made across each table.
- If the numbers look right (usually a few hundred to a few thousand changes), uncheck Run as dry run? and run it again for real.
Repeat the process for any variations of the old URL that might exist:
Always replace with the matching version of the new domain.
Method 2: WP-CLI (Command Line)
If you have SSH access, WP-CLI handles this cleanly:
If the output looks right, run it without --dry-run:
Run the same command for each URL variation (http, www, etc.).
Method 3: Manual Database Edit (Advanced)
This method is riskier because it misses serialized data (plugin settings, widget configurations), which can break if URLs are changed with a simple SQL query. Use the plugin or WP-CLI method unless you're comfortable with the risk.
If you must use phpMyAdmin:
- Open phpMyAdmin from cPanel/DirectAdmin.
- Select your WordPress database.
- Go to the
wp_options table.
- Find the rows
siteurl and home and edit them to the new URL.
- This fixes the login redirect but does NOT fix content — you'll still have images, internal links, and theme settings pointing to the old domain.
Step 5: Update wp-config.php (Optional Safety Net)
You can force WordPress to use specific URLs by adding these lines to wp-config.php:
- Open File Manager and edit
wp-config.php.
- Add these lines above the
/* That's all, stop editing! */ comment:
- Save.
This overrides the database values and is useful as a safety net during the migration. You can remove these lines later once you've confirmed everything works.
Step 6: Test the New Domain Thoroughly
Visit https://newdomain.com and check:
- Homepage loads correctly
- Images display (no broken image icons)
- Menu links point to the new domain
- Clicking any post/page works and stays on the new domain
- Login at
/wp-admin works
- After login, the admin dashboard URL shows the new domain
- No mixed-content warnings (padlock in the address bar should be solid)
- Forms submit correctly
- Contact forms send emails (test!)
Common Issues and Fixes
Images still show old domain URLs: Run Better Search Replace again — you may have missed a URL variation (like http:// without the s).
Login redirects back to old domain: Your siteurl or home value in wp_options is still the old domain. Check with phpMyAdmin or via wp-config.php overrides.
"Too many redirects" error: Usually caused by a plugin (like Really Simple SSL or a cache plugin) holding the old URL in its config. Deactivate the plugin via File Manager (rename its folder), fix the URLs, then reactivate.
Mixed content warnings: Some URLs are still http://. Run Better Search Replace to replace http://newdomain.com with https://newdomain.com.
Step 7: Set Up Redirects from the Old Domain
If you want visitors (and search engines) who still go to the old domain to be redirected to the new one, add 301 redirects.
If Both Domains Are on the Same Hosting Account
The cleanest method is .htaccess on the old domain.
- In File Manager, navigate to the old domain's document root.
- If the old domain shares a document root with the new domain (same
public_html/), you need conditional redirects. Edit .htaccess and add this at the top:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
- Save.
This redirects any request to the old domain to the equivalent URL on the new domain, preserving paths (so olddomain.com/blog/post-1 → newdomain.com/blog/post-1).
If the Old Domain Is on Separate Hosting
Apply the same .htaccess rules at the old domain's hosting, or use a simpler redirect if it's on a static host.
Alternative: Use a Redirect Plugin
Plugins like Redirection handle this within WordPress if you prefer not to touch .htaccess. However, .htaccess is faster (handled before WordPress loads).
How Long to Keep the Old Domain Active
For SEO purposes, keep the old domain registered and redirecting for at least 12 months — longer if budget allows. Google and other search engines transfer the domain's authority through 301 redirects over time, and cutting this off too early can cost you rankings.
Step 8: Update External Services
Several external services reference your site URL. Update them:
Google Search Console
- Add the new domain as a property in Search Console.
- Verify ownership.
- Use the Change of Address tool (Settings → Change of Address) to tell Google about the domain move.
- Resubmit your XML sitemap under the new domain.
- Keep the old domain verified in Search Console — you'll want to monitor the transition.
Google Analytics
- Update the property settings with the new default URL.
- If you're using GA4, the tracking code usually continues working since it's tied to the property ID, not the URL.
Google Business Profile / Other Listings
Update your website URL on:
- Google Business Profile
- Facebook Page
- LinkedIn
- Industry directories
- Any paid advertising (Google Ads, Facebook Ads)
Email Marketing
Update the "from" domain and any template links in:
- Mailchimp / Klaviyo / ConvertKit / etc.
- Automated transactional emails
- Email signatures
SSL-Dependent Services
If you use:
- Cloudflare — Add the new domain and point its DNS through Cloudflare, and update any page rules.
- CDN — Update the origin and hostname settings.
- WooCommerce payment gateways — Update API callback URLs (Stripe, PayPal, etc.).
Plugins That Cache Domain Info
Some plugins cache the old domain in their own tables or config files:
- Caching plugins — Clear all cache.
- Security plugins — May need reconfiguration.
- Form plugins (Gravity Forms, WPForms) — Check that confirmation URLs and notifications use the new domain.
Step 9: Submit the New Site to Search Engines
- Submit your new sitemap (
newdomain.com/sitemap.xml or similar) to Google Search Console.
- Submit to Bing Webmaster Tools.
- Request re-indexing of your homepage and top pages.
- Monitor crawl errors in Search Console over the following weeks — 404s often appear and can be resolved with additional redirects.
Scenario B: Moving to a New Hosting Account
If you're also changing servers, add these steps:
Option 1: Use a Migration Plugin
Plugins like Duplicator, All-in-One WP Migration, or Migrate Guru package the entire site and handle domain replacement during restore.
- Install the plugin on the old site.
- Create a backup/package.
- Download the package file.
- Install fresh WordPress on the new host (or upload the plugin's installer).
- Run the installer, which prompts for the new domain — it handles URL replacement automatically.
Option 2: Manual File + Database Transfer
- Export the database via phpMyAdmin (export as SQL).
- Download the
wp-content/ folder (or the entire WordPress folder) via FTP/File Manager.
- Upload files to the new server.
- Create a new database on the new server and import the SQL file.
- Edit
wp-config.php with the new database credentials.
- Run Better Search Replace or WP-CLI search-replace for the domain change.
Migration plugins are strongly recommended for most users — manual migration requires familiarity with databases and file transfers.
Post-Migration Monitoring
For the first few weeks after the move, watch for:
- 404 errors in Google Search Console — add redirects for any missed URLs.
- Broken images — run Better Search Replace again for any missed URL patterns.
- Traffic drops — normal for 2–6 weeks during Google's reindexing; deep drops lasting longer may indicate a redirect or SEO issue.
- Email deliverability — if your email is on the same domain, check that SPF/DKIM/DMARC records are set for the new domain.
- Admin notifications — check the email address in Settings → General is correct.
Things to Avoid
- Don't change the domain in Settings → General before doing a search/replace. Doing so may lock you out of the admin area before you can fix the URLs elsewhere.
- Don't skip the database search/replace. Just changing
siteurl and home leaves thousands of old URLs in post content, image references, and plugin settings.
- Don't cancel the old domain immediately. Leave 301 redirects in place for at least 12 months.
- Don't use a 302 redirect. Use 301 (permanent) — this is what tells Google to transfer authority.
- Don't do this during peak traffic hours if your site is business-critical. Plan for a low-traffic window.
Support Scope
Moving a WordPress site to a new domain is a task that sits within your WordPress application — not at the hosting layer. As your hosting provider, we can help with the server-side components, but the WordPress migration itself is outside our support scope.
What we can help with
- Issuing or troubleshooting SSL certificates on the new domain
- Confirming DNS is resolving correctly to our servers
- Adding the new domain to your hosting account
- Providing access to File Manager, phpMyAdmin, and backup tools
- Restoring from a backup if something goes wrong
- Investigating server-level errors (500 errors, timeouts, etc.) that aren't caused by WordPress configuration
What's outside our scope
- Performing the WordPress migration on your behalf
- Running search-and-replace operations on your database
- Diagnosing plugin or theme conflicts that appear after the move
- Fixing broken images, internal links, or redirect loops caused by incomplete URL updates
- Configuring SEO redirects, Search Console, or other external services
- Recovering a site where the migration was attempted without a backup
If you need hands-on help with the migration
We recommend hiring a WordPress developer or a specialist migration service. Options include:
- Codeable (codeable.io) — Vetted WordPress developers, pay per project.
- Fiverr or Upwork — Freelance WordPress developers, a wide range of pricing.
- Migration services — Specialists like WP Site Care, WP Buffs, or similar offer fixed-price migrations.
A developer will typically charge between $50 and $300 for a straightforward domain move, depending on site complexity and urgency. For a business-critical site, this is money well spent versus risking downtime or broken SEO.
If you're opening a ticket for the server-side components
Please include:
- The old and new domain names.
- Which of the server-side steps you're stuck on (SSL, DNS, adding the domain, etc.).
- The exact error or behaviour you're seeing.
- Confirmation that you've taken a backup before making changes.
We'll help with anything that falls within the hosting side of the move.