October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk12 min

How to Move Your WordPress Site to a New Domain Without Losing Content or Traffic

Move WordPress to a new domain without losing content or breaking links. Follow the backup, URL replacement, redirect, DNS, HTTPS, and testing sequence.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Move a WordPress site in a controlled sequence: back up the files and database, build the destination, update both WordPress URL settings, replace embedded links with a serialization-aware tool, then keep the old domain online with one-to-one 301 redirects. Finish by testing HTTPS, media, forms, feeds, login, and representative old URLs before allowing the old hosting or domain to lapse.

What changes when you move a WordPress site

A domain move changes more than the address visitors type. WordPress stores the site URL in its options table, while themes, widgets, menus, media metadata, plugin settings, canonical tags, feeds, and post content can contain the old domain as full URLs. Your hosting and DNS records also determine where requests go. A successful migration updates each layer in the right order and leaves a working route from every important old URL to its matching new URL.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The process below applies to a single-site installation moved to a different domain, whether the hosting stays the same or changes. A multisite network, a domain move combined with a server rebuild, or a site using unusual proxy rules needs additional checks described later.

Plan the move before touching the live site

Record the old and new addresses

Write down the exact source and destination URLs, including the protocol. For example, the source may be https://old.example.com and the destination https://new.example.com. Decide whether the canonical site uses the bare domain or a www host. WordPress URL fields should use the final HTTPS address with no trailing slash.

#1 Best Overall
wordpress hosting
  • easy to use
  • Free app
  • Compatible with all devices
  • It gives the best comparison between ten different hosts

Inventory dependencies

  • Hosting account, document root, PHP and database access, and DNS control.
  • TLS certificates for the new hostname and any www or alternate host that will answer requests.
  • Email forms, transactional mail, webhooks, API callbacks, payment return URLs, analytics settings, and third-party integrations that contain the old domain.
  • Search-console properties, XML sitemaps, robots directives, canonical settings, and any hard-coded URLs in theme or plugin files.

Lower the DNS time-to-live before the change if you control it and your provider permits that adjustment. This can make the cutover propagate sooner, but it does not remove the need to keep the old domain serving redirects.

Step 1: Create recoverable backups

Do this before editing a URL, importing a database, or changing DNS. The WordPress Developer Resources migration sequence begins with two independent backups: the complete WordPress files and a database export.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Back up the files

  1. Copy the entire WordPress directory, including wp-content, uploads, themes, plugins, and the existing wp-config.php.
  2. Download the copy to storage separate from the server.
  3. Keep one untouched copy. Do not edit it while preparing the destination; it is your rollback source.

Export the database

  1. Use your host’s database export function or an administration tool to export every WordPress table, including custom tables used by plugins.
  2. Store the export separately from the files and note the database name, user, host, and table prefix.
  3. Open the export only to verify that it is non-empty and contains the expected WordPress tables; do not perform a blanket find-and-replace in the dump.

A backup is useful only if it can be restored. Confirm that you know where a fresh database can be created and how files can be put back before proceeding.

Step 2: Prepare the new hosting location

Create the destination site

  1. Create the new domain or virtual host in the destination account and point its document root to the directory that will contain WordPress.
  2. Provision a database and database user. Record the database name, username, password, host, and table prefix.
  3. Install or copy the same WordPress version and required PHP extensions used by the existing site, unless you are deliberately upgrading as a separate project.
  4. Issue an HTTPS certificate for the new hostname before public cutover. Test that the certificate covers the exact host visitors will use.

Copy the files and import the database

  1. Copy the backed-up WordPress files to the destination document root.
  2. Import the untouched database export into the new database.
  3. Edit the destination wp-config.php only where the database connection values changed: database name, user, password, host, and, if applicable, table prefix.
  4. Keep the original backup outside the web root. Never expose a database dump or backup archive through a public URL.

At this stage, the copied site may still reference the old domain. That is expected; URL changes come after the destination can load the same files and database.

Step 3: Change both WordPress URL settings

Use the dashboard when it is available

  1. Sign in to the destination WordPress dashboard.
  2. Open Settings → General.
  3. Change WordPress Address (URL) to the new HTTPS address.
  4. Change Site Address (URL) to the same new HTTPS address.
  5. Use no trailing slash, for example https://new.example.com, not https://new.example.com/.
  6. Save the changes, then sign in again at the new address.

Changing only one field creates a split configuration: WordPress can load core files from one address while generating links for another. Always update both fields.

Recover a dashboard that is inaccessible

If the URL change strands the login or produces a redirect loop, temporarily add these definitions to wp-config.php above the line that says WordPress has stopped editing:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
define('WP_HOME', 'https://new.example.com');
define('WP_SITEURL', 'https://new.example.com');

Use the final HTTPS address without a trailing slash. Once you regain access and the database values are correct, remove the temporary definitions or leave them only if you intentionally want to lock the URLs in configuration. Do not define conflicting values in both the file and the database.

Step 4: Replace old-domain references safely

Updating the two General Settings fields does not rewrite links already stored in content or options. Old references commonly remain in post and page content, menus, widgets, theme settings, attachment metadata, serialized plugin options, canonical fields, and custom tables.

Why a raw SQL replacement is dangerous

Serialized PHP data stores the length of each string. A direct SQL text replacement can change the URL length without updating that length marker, corrupting the option or widget when WordPress later reads it. WordPress Developer Resources specifically warns against an unqualified search-and-replace across the entire database for this reason.

Use WP-CLI for a controlled replacement

From the WordPress directory, first run a dry run using the old and new HTTPS URLs:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp search-replace 'https://old.example.com' 'https://new.example.com' --all-tables --dry-run

Review the reported tables and replacement count. If the result is appropriate, run the same command without --dry-run:

wp search-replace 'https://old.example.com' 'https://new.example.com' --all-tables

WP-CLI documents that this command intelligently handles PHP serialized data and does not change primary-key values. If the installation uses a nonstandard table prefix or a multisite network, confirm the command’s scope before writing changes. Take another database backup immediately before the live replacement so you can restore the pre-replacement state.

Use a serialization-aware migration tool when you do not have shell access

Choose a WordPress migration or search-and-replace plugin that explicitly supports serialized data. Look for a dry-run mode, table selection, an export or rollback path, and clear handling of multisite. A dashboard tool is convenient, but it should not be treated as safer merely because it has a graphical interface. Verify the replacement report and test the site after it completes.

Check for references the database cannot change

  • Search theme and child-theme files for the old hostname, especially hard-coded asset, form, or API URLs.
  • Review plugin settings that store callback URLs outside normal WordPress tables.
  • Inspect JavaScript bundles, CSS files, environment variables, server configuration, and reverse-proxy rules.
  • Regenerate cached pages, object caches, CDN content, and optimized asset bundles after replacements.

Step 5: Preserve visitors and search paths with 301 redirects

Keep the old domain registered and reachable. Configure permanent HTTP 301 redirects from each old URL to the corresponding new URL, preserving the path and, where appropriate, the query string. Learn WordPress explains that a 301 tells search engines a page has moved permanently.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build one-to-one mappings

An old post such as https://old.example.com/guides/migrate-wordpress/ should redirect to https://new.example.com/guides/migrate-wordpress/, not to the new homepage. Path-preserving rules retain bookmarks, referrals, and the visitor’s intended destination. Create explicit exceptions for pages whose slugs changed, then map those old slugs to their new equivalents.

Choose where redirects run

  • Web-server configuration: efficient for a whole-domain move when you control Apache or Nginx and can test rules before reload.
  • Redirect plugin: practical when you need an interface, redirect logs, wildcard rules, or 404 monitoring inside WordPress. Tools such as Redirection, Simple 301 Redirects, and All-in-One SEO are examples mentioned in Learn WordPress guidance.
  • Hosting or edge layer: useful when the old site no longer runs WordPress, provided the service can preserve paths and return an actual 301 response.

Do not create chains such as old URL → temporary URL → final URL. Redirect directly to the final HTTPS destination. Avoid redirecting every unknown URL to the homepage; return a genuine 404 for content that never existed and map retired pages to the closest relevant replacement only when one exists.

Leave the old layer active

Do not cancel the old hosting or let the old domain expire at cutover. Inbound links and saved bookmarks can continue using it long after DNS changes. Keep the redirect layer available while users and search engines transition, and monitor requests for missed paths.

Step 6: Cut over DNS and HTTPS

  1. Confirm the new site works when accessed directly through the destination host and that its certificate is valid.
  2. Update the old domain’s DNS or hosting configuration so requests reach the redirect layer, while the new domain’s DNS points to the destination site.
  3. Test both bare and www hostnames if both have existed. Decide which one is canonical and redirect the other consistently.
  4. Verify that HTTP requests upgrade to HTTPS and that HTTPS requests do not produce certificate warnings, loops, or mixed-content errors.
  5. Keep DNS and the old hosting arrangement in place long enough to observe real requests and correct missed redirects.

DNS propagation is not a single instant. Different resolvers can cache old answers for different periods, so test from more than one network and continue serving the old domain during the transition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Post-migration verification checklist

Test while logged out in a private browser window as well as while logged in. Record failures by exact URL; a generic homepage check can miss broken templates and assets.

Core navigation and content

  • Homepage, primary navigation, menus, categories, tags, search, archives, and pagination.
  • Several representative posts and pages, including the oldest content and any custom post types.
  • Author pages, comments if enabled, password-protected content, and 404 behavior.
  • Internal links, anchor links, downloadable files, and image galleries.

Authentication and interactive features

  • Log in, log out, password reset, user registration, and administrator access.
  • Contact, newsletter, booking, and other forms, including confirmation messages and email delivery.
  • Checkout, webhooks, API callbacks, embeds, and any integration that validates the hostname.

SEO and delivery signals

  • Canonical tags point to the new HTTPS URLs.
  • XML sitemaps contain the new domain and load successfully.
  • Robots directives do not accidentally block the new site or expose a staging copy.
  • Feeds, Open Graph metadata, structured-data URLs, and hreflang links, if used, contain the new host.
  • A crawl finds no old-domain internal links, mixed-content requests, or unexpected 404s.

Redirect tests

  1. Request the old homepage and several old posts, pages, media files, feeds, and known deep links.
  2. Confirm each response is a single 301 to the matching new URL.
  3. Follow the destination and verify it returns a successful page over HTTPS.
  4. Check query-string behavior for campaign links and search URLs that must retain parameters.

If rewrite rules appear stale, open Settings → Permalinks and click Save Changes without changing the structure. This regenerates WordPress rewrite rules.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failures and precise fixes

Redirect loop after changing the domain

Check for conflicting WP_HOME and WP_SITEURL definitions, mismatched HTTP and HTTPS values, proxy HTTPS headers, and server rules that redirect in both directions. Temporarily force both WordPress URL constants to the final HTTPS host, clear caches, and retest before removing the temporary override.

Dashboard redirects to the old host

The database may still contain the old URL, or a plugin may have cached it. Use the temporary constants in wp-config.php, sign in, run a serialization-aware replacement, clear caches, and then inspect both General Settings fields.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Images or styles are broken

Inspect the browser’s failed request URL. Replace old-domain references in content and options, update hard-coded theme paths, regenerate optimized assets, and clear page, object, browser, and CDN caches. Mixed-content warnings indicate that an HTTPS page is requesting an HTTP asset; update that asset to HTTPS rather than hiding the warning.

Permalinks return 404

Save the permalink settings once to refresh rewrite rules. Confirm the destination document root and server rewrite module, then test a known post URL. If only a subset fails, inspect slug changes and create explicit redirects for those paths.

Best Value
WordPress Hosting Guide
  • Free WordPress Hosting Guide Android Application. It Contains: A Brief Overview of WordPress Hosting, 9 Major Benefits of Managed WordPress Hosting.
  • 5 Simple Steps to Choose WordPress Hosting, How to Maximize Your WordPress Hosting and Blogging Success, How to Choose the Best WordPress Hosting Provider, Optimize Your Blog with VIP Word.
  • Press Hosting, What You Should Know to Choose the Best WordPress Hosting and Much More.

Forms or integrations stop working

Update allowlists, callback URLs, webhook endpoints, CORS settings, and email sender or return URLs in the affected service. Submit each critical form and verify both the on-screen result and the receiving system.

Traffic reaches the old site or disappears

Check DNS records, certificate coverage, caching, and whether the old host still serves redirects. A 301 cannot work after the old domain expires. Review server and redirect logs for paths that were not mapped, then add one-to-one rules rather than sending all misses to the homepage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choosing a migration method

The right implementation depends on access and risk, not on whether a tool has a dashboard.

Method Access required Data-safety considerations Redirect and monitoring fit Best operational fit
Dashboard migration plugin WordPress administrator access Use only when it supports PHP serialization, dry runs, table selection, and a rollback or export. Convenient for redirect rules, logs, and 404 reports when those features are included. Sites where shell or database access is limited; verify plugin compatibility before the move.
WP-CLI Shell access and a working WordPress installation wp search-replace handles serialized data and preserves primary-key values; run a dry run and keep a fresh backup. Pair it with web-server or edge redirects and inspect logs separately. Repeatable migrations, development-to-production workflows, and administrators who need auditable commands.
Database administration plus manual file copy Database and filesystem access Raw SQL replacement is unsafe for serialized values; use a serialization-aware process instead. Redirects must be configured independently at the server, host, or WordPress layer. Controlled environments with experienced database and server administrators.

For a host change, plan database credentials, filesystem permissions, PHP compatibility, DNS, and certificates together. For a same-host domain change, the file copy may be minimal, but URL replacement and redirects are still required.

Special cases: multisite and complex installations

A WordPress multisite network stores network-wide domains and site-specific URLs, so changing one site’s address is not equivalent to changing a single-site installation. Confirm whether the move affects the network domain, mapped domains, subdirectories, or subdomains. Review network administration settings, sunrise or domain-mapping code, rewrite rules, and every site’s uploads and canonical URLs before running a replacement. Use a staging clone and a network-aware procedure; do not apply a single-site command blindly to production.

Sites behind a reverse proxy or content-delivery layer also need consistent HTTPS detection. The proxy must pass the correct scheme and host, and the origin must generate links for the public HTTPS address. Caching layers should be purged only after the new URLs and redirects are correct, otherwise stale HTML can reintroduce old links.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Rollback plan

  1. Stop making additional edits and preserve the current logs and error messages.
  2. Restore the untouched database export if the replacement damaged options or content.
  3. Restore the original files if theme, plugin, or configuration changes caused the failure.
  4. Point DNS or the temporary host back to the original working installation.
  5. Keep the old domain serving its known-good configuration while you correct the destination in staging.

Rollback is easiest when the files, database, DNS values, and URL mapping were recorded before the move. Do not overwrite your only backup with a post-migration copy.

Quick Recap

Bestseller No. 1
wordpress hosting
wordpress hosting
easy to use; Free app; Compatible with all devices; It gives the best comparison between ten different hosts
Bestseller No. 5
WordPress Hosting Guide
WordPress Hosting Guide
Press Hosting, What You Should Know to Choose the Best WordPress Hosting and Much More.

Final go-live sequence

  1. Verify recoverable files and database backups.
  2. Confirm the destination database, files, wp-config.php, PHP runtime, and HTTPS certificate.
  3. Set both WordPress URL fields to the final HTTPS address.
  4. Run a dry-run, then a serialization-aware replacement for embedded old-domain URLs.
  5. Configure direct, path-preserving 301 redirects on the old domain.
  6. Switch DNS and leave the old domain and redirect layer active.
  7. Test content, media, login, forms, feeds, canonical tags, robots directives, internal links, and representative old URLs.
  8. Crawl for 404s, mixed content, stale hostnames, redirect chains, and unexpected blocks; fix issues before retiring the old hosting.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.