Setup & site building · Guide
How to Replace a WordPress Site with Another (Step by Step)

Short answer
Back up the old site, build the new one on staging or a temporary address, then push or migrate it over the old site. Run a search and replace to update URLs, add 301 redirects for changed pages, re-enable search indexing and test forms, checkout and links.
Key takeaways
- Always take a full off-server backup before the swap.
- Build on staging, a subdomain or locally, and block indexing there.
- Use a host push, migration plugin or manual swap to replace the live site.
- Run a serialized-safe search and replace, then resave permalinks.
- Redirect changed URLs and turn search indexing back on.
How do you replace a WordPress site with another?
Back up the current site, build the new site on a staging copy or temporary address, then migrate it over the old one, replace the URLs, set up redirects and test everything before you announce it.
People do this for redesigns, rebrands, and when a developer hands over a fresh build. The goal is always the same: the new site appears on the same domain with as little downtime and lost traffic as possible.
The safest approach never edits the live site directly. You build and check everything somewhere else, then swap it in one step.
This guide covers each step, the three main swap methods, and what to check afterward so you keep your rankings.
What should you do before replacing the site?
Take a full backup of the old site, list its important URLs, and note any settings, forms, tracking codes and email setups that the new site must keep.
A full backup means both files and the database. Store a copy off the server, so you can restore it if the swap goes wrong. Our guide on restoring a WordPress site from backup explains how to get back if you need to.
Next, export a list of your current URLs. Your XML sitemap or a crawl tool gives you every page and post. Google Search Console shows which pages bring the most traffic.
Then list the things that are easy to forget:
- Analytics and tracking codes
- Contact form destinations and SMTP settings
- Store orders, customers and subscriptions
- User accounts and memberships
- Redirects already in place
- Search Console and other site verification codes
Where should you build the new site?
Build the new site on a staging site, a subdomain, or a local install, so the live site keeps running while you work.
| Build location | Pros | Cons |
|---|---|---|
| Host staging site | One-click push to live on many hosts | Tied to your current host |
| Subdomain, like new.example.com | Easy to share with clients | Must block search engines |
| Local install | Fast and private | Harder for others to review |
| New hosting account | Clean server, test before DNS change | Needs a DNS switch at the end |
Many managed hosts include staging with a push button that copies the staging site to live. Our guide on setting up a staging site covers both host tools and plugins.
Whatever you choose, tick Discourage search engines from indexing this site under Settings, then Reading on the build copy. You do not want Google indexing a duplicate.
How do you move the new site over the old one?
Use your host's staging push, a migration plugin that overwrites the destination, or a manual file and database swap, then update the URLs to the live domain.
Option 1: Host staging push. If you built on your host's staging, use its push to live tool. It copies files and the database and usually handles URL changes for you.
Option 2: Migration plugin. Plugins like Duplicator, All-in-One WP Migration and UpdraftPlus package the new site and restore it over the old one. Our guide to migrating with Duplicator covers the most popular option step by step.
If you prefer a simpler export and import file, see our walkthrough of All-in-One WP Migration. Large sites may hit its free import limit, so check the file size first.
Option 3: Manual swap. Copy the new site's files over FTP and import its database through phpMyAdmin. The official Moving WordPress guide explains the manual process.
Every method replaces the old site completely. Anything that exists only on the old site, such as recent orders or comments, will be lost unless you move it first.
How do you update URLs after the swap?
Run a search and replace on the database to change every old address, such as the staging or subdomain URL, to the live domain.
WordPress stores full URLs in posts, settings, widgets and plugin data. If you skip this step, images and links may still point to the staging copy.
Use a tool that handles serialized data safely. WP-CLI's search-replace command does this, and you can test it first with a dry run:
wp search-replace 'https://new.example.com' 'https://example.com' --all-tables --dry-run
Remove --dry-run once the preview looks right. The WP-CLI site explains how to install the tool if your host does not include it. Our guide on search and replace in the WordPress database explains plugin options if you do not use the command line.
After the replace, go to Settings, then Permalinks and click Save Changes once. This refreshes the rewrite rules.
How do you keep your SEO when replacing a site?
Keep the same URLs wherever possible, and add 301 redirects from every old URL that changed or was removed to the closest matching new page.
Redirects pass visitors and most ranking signals to the new page. Without them, old links and bookmarks hit 404 errors and traffic can drop.
Match your saved URL list against the new site. For each old page with no exact match, add a redirect. A plugin such as Redirection makes this manageable.
Google's guide to site moves with URL changes explains how search engines handle this.
Also check that titles, meta descriptions and structured data carried over. Our guide on moving a WordPress site without losing SEO has a full checklist.
Check internal links too. Menus, buttons and reusable blocks often contain hard-coded links to old page addresses that no longer exist.
Finally, untick Discourage search engines on the live site. Forgetting this is one of the most common causes of traffic loss after a relaunch.
Do you need to change DNS?
You only need to change DNS if the new site lives on a different server or hosting account; if it replaces the old site on the same server, the domain already points to the right place.
If you built on a new host, point the domain's A record or nameservers to that host once the site is ready. Our guide on pointing a domain to WordPress hosting walks through it.
DNS changes can take time to spread. Keep the old hosting active for a few days so visitors who still reach it see a working site.
Install the SSL certificate on the new host before or right after the switch, so the site loads over HTTPS without warnings.
What should you test after replacing the site?
Test page loading, forms, checkout, logins, emails, redirects, mobile layout and site speed, then watch Search Console for errors over the next few weeks.
Work through this list right after the swap:
- Visit the home page and key pages while logged out.
- Submit every form and confirm the emails arrive.
- Place a test order if you run a store.
- Click through old URLs to check the redirects.
- Check images and links do not point to staging.
- Run a speed test and check the mobile view.
- Submit the new sitemap in Search Console.
If links break after the move, our guide on fixing broken links after migration covers the usual causes.
What if you need to roll back?
Restore the backup of the old site you took before the swap; with a full files and database backup, you can return to the previous site in minutes.
That is why the backup comes first. Test that it is complete before you start, not after something breaks.
Keep the backup somewhere you can reach even if the server is down, such as cloud storage or your own computer. A backup that only lives on the broken server is not much help.
If you only need to undo part of the change, such as one page, you can copy content from the old backup into the new site instead of a full restore.
Is replacing a site different from changing the domain?
Yes, replacing a site swaps the content on the same domain, while changing the domain moves the same site to a new address.
Some projects do both at once, such as a rebrand with a new design and a new name. In that case, finish one step, check it, then do the other.
For the domain side, see our guide on changing the domain of a WordPress site.
Frequently asked questions
Will replacing my WordPress site cause downtime?
Usually only a few minutes, while the files and database are overwritten. A host's staging push is often the quickest. If you move to a new server, the old site keeps serving visitors until DNS updates, so downtime can be close to zero.
Will I lose my Google rankings if I replace my site?
Not if you keep important URLs, redirect changed ones with 301 redirects, keep good content and re-enable indexing. Some movement is normal for a few weeks after a big redesign. Large drops usually come from missing redirects or a forgotten noindex setting.
How do I keep WooCommerce orders when replacing a store?
Orders placed on the old site after you copied it will be lost if you overwrite the database. Put the store in maintenance mode during the final swap, or export recent orders and customers and import them into the new site before going live.
Can I replace a non-WordPress site with WordPress?
Yes. Build the WordPress site on a staging address or new hosting, move your content across, then point the domain to it or upload it in place of the old files. Map old URLs, which often end in html, to the new pages with 301 redirects.
Should I delete the old site after replacing it?
Keep a complete backup of the old site for at least a few months. You may need old content, settings or data later. Once the new site is stable and you have that backup stored safely, you can remove old staging copies and hosting.
Sources
- Moving WordPress WordPress Developer Resources
- wp search-replace WordPress Developer Resources
- Redirection plugin WordPress.org
- Site moves with URL changes Google Search Central
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


