There are plenty of good reasons to clone a WordPress site: to test updates without risking the live site, to redesign in private, to start a new project from an existing one, or to move to a new host. A clone is simply a working copy of your files and your database. This guide explains three ways to do it, and the checks that stop your copy from causing trouble.
The short version
- Back up first. A clone does not replace a backup. Take one before you copy anything.
- The easiest route is usually your host’s staging or clone tool. If it has one, start there.
- A plugin or a manual copy works anywhere. They take more steps, but you stay in control.
- Lock the clone down. Tell search engines to stay away, and stop it sending emails or taking payments.
What it means to clone a WordPress site
A WordPress site has two parts: the files (WordPress itself, your theme, your plugins and your uploaded media) and the database (your posts, pages, settings and users). To clone a WordPress site you copy both, put them somewhere new, and tell the copy its new address.
| Term | What it is | When to use it |
|---|---|---|
| Clone | A full working copy of a site in a new place | Testing, redesigning or starting a similar site |
| Migrate | Moving a site to a new host or domain and switching to it | Changing provider or address |
| Backup | A saved copy you can restore from | Always, before any change |
| Staging | A private clone used to test changes, then pushed live | Testing updates and redesigns safely |
The steps for cloning and migrating overlap heavily. If you are moving rather than copying, our guide to migrating WordPress to a new host covers the switch itself.
Before you start
A little preparation prevents most clone problems. Run through these points first.
- Take a full backup of the files and the database and keep a copy off the server. The WordPress backup guide explains how.
- Check the size. Very large media libraries make clones slower, and some plugins and hosts have limits.
- Note your versions. The clone should run the same PHP and database versions as the original, or newer ones you have tested.
- Choose where the clone will live. A subdomain such as staging.example.com, a folder or a local computer all work.
- Decide what the clone is for. A short-lived test copy needs fewer safeguards than a copy that will become a new site.
A clone of a site that takes orders or sends email can do both. Customers can receive duplicate emails, and payment gateways in live mode can try to take real money. Put every gateway in test mode and stop outgoing email on the clone before you open it.
Method 1: use your host’s staging or clone tool
Many hosting companies include a one-click staging or clone feature in their control panel. It is the fastest and safest way to clone a WordPress site, because the host handles the copying and usually the URL changes.
- Open your hosting control panel and look for “Staging”, “Clone” or “Copy site”.
- Create a new staging site from your live site. Choose the files and the database.
- Wait for the copy to finish. Large sites can take several minutes.
- Open the staging address and log in with your normal admin details.
- Test your changes there, then use the host’s “push to live” option only if it offers one and you have a backup.
The names and options differ between hosts, and not every plan includes the feature, so check your host’s help pages. If yours does not offer it, use one of the next two methods.
Method 2: clone a WordPress site with a plugin
Migration and backup plugins package your files and database into one set of files, which you then restore on the new site. Well-known examples include Duplicator, UpdraftPlus and All-in-One WP Migration. Each has its own screens and limits, so follow the plugin’s own guide, but the pattern is similar.
- Install the plugin on the original site and create a package or export of the whole site.
- Download the package to your computer.
- Prepare the new place. Create an empty database and a user for it, and make sure the folder or subdomain exists.
- Upload the package and any installer file the plugin gives you to the new location.
- Run the installer or import. Enter the database details and the new site address when it asks.
- Log in to the clone and check that pages, images and settings are intact.
- Works on almost any host and does not need command-line skills.
- The plugin handles the address change for you.
- The same package can double as a backup.
- Large sites can hit upload, memory or time limits.
- Free versions of some plugins limit file size or features.
- You rely on the plugin working with your host and your other plugins.
Method 3: clone a WordPress site by hand
Doing it manually gives you the most control and no plugin dependency. It is also how migrations are done at many agencies. You need access to your files and to a database tool such as phpMyAdmin or the command line.
- Copy the files. Download the whole WordPress folder from the original site and upload it to the new location, or copy it on the server.
- Export the database. Use phpMyAdmin or run
wp db exportto save a .sql file. - Create a new database and user at the new place, then import the .sql file.
- Edit
wp-config.phpon the clone to use the new database name, user, password and host. - Update the site address. In the clone’s database, or with WP-CLI, change the
siteurlandhomeoptions to the new address. - Replace old URLs in the content. Use a tool that understands serialised data, such as WP-CLI’s search-replace.
- Save the permalinks again (Settings, Permalinks, Save) so the rewrite rules are rebuilt.
The official guide to moving WordPress explains each of these steps, including the warning that a plain text find-and-replace can break serialised data, and that you should never change the guid column.
A typical WP-CLI search and replace
If you have command-line access, a search and replace looks like this. Run it with --dry-run first to see what would change.
wp search-replace "https://example.com" "https://staging.example.com" --skip-columns=guid --dry-runThen run it again without --dry-run. The WP-CLI documentation lists the options. Always do this on the clone, never on the original.
Which method should you choose?
| Aspect | Host tool | Plugin | By hand |
|---|---|---|---|
| Skill needed | Low | Low to medium | Medium to high |
| Speed | Fast | Medium | Slowest the first time |
| Control | Limited to what the host offers | Good | Complete |
| Works on any host | No, only where offered | Yes | Yes |
| Best for | Regular staging and testing | One-off copies and moves | Large or unusual sites |
A local copy on your own computer
You do not have to put the clone on the internet at all. Local development tools run WordPress on your own computer, with a web server and a database installed for you, and they can import a copy of your site. A local clone is private by nature, costs nothing to host and is a good place to try a theme change, a plugin update or a risky edit.
The steps are the same as the manual method: copy the files, import the database, point the copy at its local address and replace the old URLs. The one extra thing to remember is that a local copy is not reachable by anyone else, so you cannot use it to show work to a client unless you share it another way.
After cloning: make the copy safe
This part is easy to skip and expensive to forget. A fresh clone is a second public copy of your site, and it behaves like the original unless you stop it.
- Tell search engines to stay away. In Settings, Reading, switch on the option that discourages search engines from indexing the site. A public duplicate can confuse search results.
- Add a password if the site is staging. Password protection stops both search engines and visitors from finding it.
- Stop outgoing email. Use a plugin or a setting to block or redirect email so customers do not get duplicates.
- Switch payment gateways to test mode and disable subscriptions, scheduled tasks and webhooks that talk to live services.
- Check analytics and ad tags. You do not want clone visits mixed into your real numbers.
- Update the admin email if you want notifications to go somewhere different.
Troubleshooting a clone that will not work
| What you see | Likely cause | What to try |
|---|---|---|
| A white screen | A PHP error or a plugin that conflicts on the new server | Turn on debug logging, then rename the plugins folder to disable all plugins |
| The clone redirects to the old site | The old address is still in the database or in wp-config.php | Check siteurl and home, and search for hard-coded addresses |
| Images are missing | Old URLs, or uploads were not copied | Run the search and replace and check the uploads folder |
| You cannot log in | Cookies or a changed address, or a security plugin blocking you | Clear cookies, check the address and disable the plugin by renaming its folder |
| Pages return 404 | The rewrite rules are missing | Re-save the permalinks, and check the .htaccess file |
Frequently asked questions
Is it safe to clone a WordPress site?
Yes, if you take a backup first and lock the clone down afterwards. The risk is not the copy itself, but forgetting that a clone can send email, take payments or be indexed by search engines.
Will cloning hurt my SEO?
A public duplicate can compete with the original in search results. Keep the clone private or tell search engines not to index it until you have decided what it is for.
Can I clone a site to my computer?
Yes. Local development tools run WordPress on your own computer, and you can import a copy of your site into one. It is a safe place to test.
Do I need to copy the whole site?
For an accurate test, yes. If you only need a theme or a few settings, you can start fresh and copy only what you need.
What is the difference between cloning and migrating?
Cloning makes a copy and leaves the original running. Migrating moves the site to a new place and then switches to it. The copying steps are the same.
Can I clone a WooCommerce shop?
Yes, but treat it carefully. Put payment methods in test mode and stop emails and scheduled actions first so the copy cannot contact customers.
