How to Clone a WordPress Site: 4 Ways, Step by Step
Cloning a WordPress site gives you an exact copy to test on, to start a new client site from, or to move to a new host. The copy is the easy part; the details after it, such as old URLs in the database and a copy that emails real customers, are where clones go wrong. Here are four ways to do it, and the checklist for after.
In this article
Key takeaways
- Fastest: your host's clone or staging tool, such as WP Engine's environment copies or Kinsta's, Cloudways' and Hostinger's cloning.
- No host tool: Duplicator, All-in-One WP Migration, WPvivid or Migrate Guru copy a whole site.
- Developers: copy files and the database, then run wp search-replace, which handles serialized data.
- Block indexing on the copy and stop its emails, scheduled jobs and live payments.
- Never push a clone's database over a live store: new orders and users would be lost.
The short answer
- Use your host’s clone or staging tool if it has one.
- Otherwise use a migration plugin: Duplicator, All-in-One WP Migration, WPvivid or Migrate Guru.
- Developers: copy the files and database, then run
wp search-replaceto change the address. - Make the copy safe: block search engines, stop outgoing email and live payments, and never copy its database back over a live store.
Only need a copy of one page or post? See how to duplicate a page in WordPress instead.
Method 1: your host's clone tool
Managed hosts usually clone a site in a few clicks, files and database together, with the address changed for you:
- WP Engine: copy environments by pushing or pulling between them. WP Engine suggests a maintenance page on both sides while copying, and warns that pushing a whole database to production overwrites it, losing new orders or users.
- Kinsta: site cloning is included on its agency plans.
- Cloudways: staging and cloning are free on its Flexible plans.
- Hostinger: its agency plans include one-click website cloning and free staging.
Comparing hosts? Our agency hosting comparison covers what each includes.
Method 2: a migration plugin
When the host can’t do it, or you’re cloning to another host, a plugin packages the site and rebuilds it at the new address (WordPress.org installs on 20 November 2026):
| Plugin | Active installs | How it works |
|---|---|---|
| All-in-One WP Migration | 5,000,000+ | Export the site to a file, import it on the new install. The free version exports any size; the import is limited by the host’s upload size. |
| Duplicator | 1,000,000+ | Builds a package of the site to back up, migrate or clone for staging, between domains or hosts. |
| WPvivid | 900,000+ | Backups, migration and a staging site in a subdirectory, in the free version. |
| Migrate Guru | 200,000+ | Copies a site straight to a new host or domain. |
- Install WordPress and the same plugin on the destination.
- Export or package the source site.
- Import on the destination and let the plugin replace the old address.
- Log in on the copy and check pages, images, forms and the menu.
Method 3: WP-CLI, for developers
With shell access on both servers, the manual route is quick and repeatable:
# On the source site
wp db export site.sql
tar -czf wp-content.tar.gz wp-content
# On the destination, with WordPress core, wp-content and wp-config.php in place
wp db import site.sql
wp search-replace 'https://example.com' 'https://staging.example.com' --all-tables --dry-run
wp search-replace 'https://example.com' 'https://staging.example.com' --all-tables
wp cache flushwp search-replace handles PHP serialized data, which a plain text replace on the SQL file would corrupt, and --dry-run shows what would change first. If the copy should answer at a fixed address before the database is updated, WordPress’s migration guide shows how to set WP_HOME and WP_SITEURL in wp-config.php. Those steps are for single sites; Multisite needs more manual database work.
Method 4: a WPOS migration key
WPOS is our product, so weigh this accordingly. Every site and sandbox in a WPOS workspace has a migration key. Paste it into the WPOS plugin on another WordPress install and the site is copied there: pages and posts with their builder content, the themes and plugins it uses, media, menus and site settings, plus the WPOS work that goes with it. The source site isn’t changed, so it works as a clone; whatever was on the destination install is replaced, and WPOS names what will be deleted before anything is sent.
After cloning: make the copy safe
- Keep it out of Google: tick Settings → Reading → Discourage search engines from indexing this site on the copy, and add a password if your host offers one.
- Stop real emails: a copy of a shop or membership site can email real customers. Switch off or redirect outgoing mail on the copy.
- Switch payments to test mode and pause scheduled jobs, subscription renewals and webhooks to other systems.
- Fix leftovers: clear the cache, check images and links point at the copy, and update any hardcoded URLs in theme settings or page builders.
- Stores: never push the copy’s database over the live site, or orders placed since the copy are lost. See WooCommerce care plans for a safe update routine.
- Before you start: take a fresh backup of the source.
Where WPOS fits
On a cloned or staging copy, WPOS works the same way as on the live site: inside wp-admin, with every change checked on the page and kept as a version you can undo. It also connects to InstaWP to create and clone sites from the same chat. A typical request on a fresh copy:
“This is a staging copy: tick Discourage search engines, switch the payment gateway to test mode, and list every place that still links to the live domain.”
WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.
Frequently Asked Questions
Use your host's clone or staging tool if it has one; it's the fastest. Otherwise use a migration plugin such as Duplicator, All-in-One WP Migration, WPvivid or Migrate Guru, or, if you're comfortable on the command line, copy the files and database and run WP-CLI's search-replace to change the address.
A clone is a full copy that runs alongside the original, for example for staging or a new client. A migration moves the site and the old copy is retired. The steps are the same; what happens to the original afterwards is not.
Yes. Many hosts include cloning, and the free versions of Duplicator, All-in-One WP Migration, WPvivid and Migrate Guru can copy a site. Very large sites can run into upload limits on some free routes.
Because WordPress stores full URLs in the database, often inside serialized data. Replace them with WP-CLI's search-replace, which handles serialized data safely, or with the migration plugin's replace step. Don't use a plain find-and-replace on a database file.
Tick Settings, then Reading, Discourage search engines from indexing this site on the copy, and protect it with a password if you can. Untick it only when the copy becomes the live site.
Yes, but never copy a clone's database back over the live store: orders and customers placed in the meantime would be lost. Copy code and settings to live, not the database, and switch payments to test mode on the copy.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
Copy the site. Then change it safely.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.