---
title: "How to Clone a WordPress Site: 4 Ways, Step by Step"
description: "Clone a WordPress site with your host, a plugin or WP-CLI, fix the URLs in the database safely, and keep the copy out of Google and away from customers."
source: https://wpos.ai/blog/how-to-clone-a-wordpress-site/
updated: 2026-11-20
---

[Black Friday](https://wpos.ai/black-friday/): 15,000 free credits + 50% off ends Nov 30

# 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.

- Migrations

- Step by step

- 2026

## 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-replace` to 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](https://wpos.ai/blog/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](https://wpengine.com/support/copy-site/) 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](https://wpos.ai/best-wordpress-hosting-for-agencies/) 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](https://wordpress.org/plugins/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](https://wordpress.org/plugins/duplicator/) | 1,000,000+ | Builds a package of the site to back up, migrate or clone for staging, between domains or hosts. |
| [WPvivid](https://wordpress.org/plugins/wpvivid-backuprestore/) | 900,000+ | Backups, migration and a staging site in a subdirectory, in the free version. |
| [Migrate Guru](https://wordpress.org/plugins/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 flush`[wp search-replace](https://developer.wordpress.org/cli/commands/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](https://developer.wordpress.org/advanced-administration/upgrade/migrating/) 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](https://wpos.ai/features/sandboxes/) 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](https://wpos.ai/woocommerce-care-plans/) for a safe update routine.
- **Before you start:** take a fresh [backup](https://wpos.ai/blog/how-to-backup-a-wordpress-site/) 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](https://app.wpos.ai/signup?ref_page=how-to-clone-a-wordpress-site&ref_cta=body-cta) with 5,000 credits, a live site plus a staging sandbox, and no card.

## Frequently Asked Questions

**How do I clone a WordPress site?**

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.

**What's the difference between cloning and migrating?**

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.

**Can I clone a WordPress site for free?**

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.

**Why do links on the clone still point to the old site?**

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.

**How do I stop the clone from appearing in Google?**

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.

**Can I clone a WooCommerce store?**

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.

**Black Friday**ends Nov 30

## 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.

[Claim 15,000 credits](https://app.wpos.ai/signup?ref_page=how-to-clone-a-wordpress-site&ref_cta=prefooter-cta): Start free
