Sometimes you might need to clone your WordPress site. Maybe you want to use it as a template for a new site, or you want to make a copy of your old site on new hosting or a new domain.
Sometimes you don’t actually need to duplicate your site. If you’re moving it to new hosting or a new domain, you might find that following our guide to moving your WordPress site to a new domain gives you all the advice you need.
- How to Copy a WordPress Site From One Domain to AnotherRachel McCollin30 Jun 2020
- How to Migrate a WordPress SiteRachel McCollin30 Mar 2020
But if you do need to make a copy of your WordPress site, there are a few ways to do it.
In this tutorial, I’ll show you two ways to clone your WordPress site. The first is for a standalone site, and the second is for a site in a WordPress multisite network.
So let’s start with a standalone site, with one website and one WordPress installation.
Cloning Your WordPress Site With a Plugin
The easiest way to clone your WordPress site is to use the Duplicator plugin, which is free. This lets you create a package containing all the data relating to your site, and then import that to another location and clone the site there.
Create a Package of Your Starting Site
Start by installing and activating the plugin on the site you want to clone—your starting site.
Now go to Duplicator in the admin menu to access the duplicator screen.
To clone your site, you need to create a package. Click the Create New button to start the process. This will open the new package screen.
Give your package a name and click the Storage tab to choose where you want to store it. With the free version of the plugin, you can store it on your server where your website is hosted. If you buy the premium version of the plugin, you have cloud storage options like Dropbox and Google Drive.
Open the Archive tab to choose to archive database tables and files. To run a quick clone, you can leave this as the default and move on to the next step.
Click the Next button to continue.
The plugin will then scan your site to check that it can be duplicated. If there are any issues, it will generate a notice and warn you.
Here the plugin has flagged the fact that there are two very large files in the uploads folder. I can choose to omit those from the package if I want or to leave them in and run the risk of having problems when I import the package to my new site. If you’re using good hosting, you shouldn’t have a problem. We recommend SiteGround for reliable WordPress hosting.
If you do filter some files, click the link to rescan your site before building your package, so the installer file has the right metadata about the size and contents of your package.
If you’ve received notices and you’re happy to continue, check the box. Then (and this applies if you haven’t got any notices too), click the Build button to build your package.
The plugin will start the process of building a package and show you a progress screen.
Once it’s done, it will show you a success screen with a link to download the files. You’ll need the archive and the installer, so download them both.
Import the Package to Your New Site
Now it’s time to import the package from your old server and use it to populate your new site.
You’ll need FTP access to your new server as you’ll have to upload the installer and archive files to it. Upload them to a new empty directory inside your root directory, such as yourdomain.com/duplicate.
Important: don’t install WordPress on the new server. The installer will install it for you with any customisations you had in the starting site.
You’ll find the installer and archive files on your computer, in your downloads folder, or wherever you saved them to. The installer is a PHP file called installer.php, and the archive is a zip file. Don’t unzip that file: upload it as a zip file.
You should now have two files in that directory: the installer and the archive.
Note: Make sure the zip file is fully downloaded before you copy it to your server, and that it’s fully copied before you go to the next part of the process.
In your new site, go to newdomain.com/folder/installer.php in your browser, where folder is the name of the directory you uploaded the files to.
Note: If you get an error message, it’s probably because you went to this screen before the zip file had fully uploaded to your server. Just wait, and refresh when it’s done.
This will take you to the first screen in the import process. If you want to configure the import, you can expand the tabs and explore the options; otherwise just leave things as they are. Check the terms & notices checkbox and click the Next button.
The plugin will extract the archive file and take you to the Install Database screen.
Here you have the option to create a new database or to remove all data from an existing database and overwrite it. As your server doesn’t have WordPress installed yet, you’ll be creating a new database. Type in the name of the new database and the username and password you’ve already set up with your hosting provider.
Tip: If you’re having problems connecting to create a database, try creating a new empty database in phpMyAdmin, and then use that database and its user with Duplicator's option to replace an existing database.
Select the options you want, and click the Test Database button. When the test runs okay, click the Next button.
You’ll see a popup checking whether you want to proceed. Click the OK button.
The Duplicator plugin will then install the database and take you to the Update Data screen.
Change the URL and path to the new site if you want to. Right now, they’ll be in the folder where you put the installer and zip files. You’ll probably want to edit those fields and use the root directory, though. Then click the Next button.
You’ll then be taken to the Duplicator installer's final screen, which tells you to log in to your new WordPress site and delete all installer files. This is important for security reasons.
If you keep the auto delete checkbox checked, the plugin will automatically delete those files the first time you log in to your new site. Your login details will be the same as they were for your old site.
Now log in to your new site, and you’ll find it’s identical to your old site. You’ve successfully cloned your WordPress site.
Cloning a WordPress Site in a Multisite Network
If you run a multisite network and want to clone one or more of the sites in it, this is even easier. Cloning sites in your network is useful when you want to create a similar site, maybe for another part of your business. Or maybe you have a base site that you use as a template for new sites in your network, and you want to clone that.
To clone sites in your WordPress multisite network, use the NS Cloner—Site Copier plugin.
Start by installing the plugin and network activating it.
Then go to NS Cloner in the WordPress admin menu. Select the site you want to clone, and give the cloned version of the site a name.
Then scroll down and click the Clone button.
The plugin will run the cloning process and give you a success message telling you it’s done. This could be quick for a small site but could take a while for a large site with lots of files. If you need to, go and make a coffee while you wait.
And that’s it! You now have a duplicate of your site on the new location in the network. You can now log in to the new site and make any adjustments you need to in order to perfect your new site.
Being able to easily clone your site without having to manually copy files and database tables to your new WordPress installation will save you lots of time if you need to move your site or create a copy of it in a new location.
Whether you’re copying your site to a fresh WordPress installation or cloning a site within a multisite network, the steps above will show you how to create a carbon copy of your site.
The Best WordPress Themes and Plugins on Envato Market
Explore thousands of the best WordPress themes ever created on ThemeForest and leading WordPress plugins on CodeCanyon. Purchase these high-quality WordPress themes and plugins and improve your website experience for you and your visitors.
Here are a few of the best-selling and up-and-coming WordPress themes and plugins available for 2020.
- 29 Best Portfolio WordPress Themes for CreativesBrenda Barron19 Jan 2022
- 21 Best WordPress Slider & Carousel Plugins of 2022Daniel Strongin01 Jun 2022
- 30+ Best WordPress Calendar Plugins and Widgets (With 5 Free Plugins)Daniel Strongin12 Apr 2022
- 31+ Best Responsive WordPress Themes (For Sites in 2022)Brenda Barron19 Jan 2022
- 21 Best WPBakery Page Builder (Visual Composer) Addons and Extensions of 2022Daniel Strongin21 Aug 2021
- 35 Best Coaching & Consulting WordPress Themes for 2022Brenda Barron13 May 2021