There are many reasons that you may want to clone a WordPress website. These can include testing new plugins, trying new themes, or moving your site to a new server.
It’s actually very easy to make a copy of your WordPress site using the plugin Duplicator. The plugin will pack up your uploads, themes, plugins, and most importantly all of your WordPress content.
Here we’ll show you the 5 easy to follow steps to clone your WordPress site using Duplicator.
Reasons to copy a WordPress site:
- Create a staging site to test WordPress changes like themes or plugins
- Move your WordPress site to a new web host/server
- Backup your WordPress site
How to Clone a WordPress site using Duplicator
There are tons of plugins that let you migrate your WordPress site. For this tutorial, we’ll be using Duplicator since it’s simple to use and free.
Here are the 5 easy to follow steps to clone WordPress site:
Step 1. Install Duplicator on your WordPress site
The first thing you’ll need to do is install the Duplicator plugin. This is as simple as going to your dashboard and clicking Plugins/Add new. Then search “Duplicator” and it should be the first result (it has over 1+ million active installations).
If you need more help installing Duplicator read our guide to installing WordPress plugins.
After you install and active Duplicator you’ll see Duplicator in your admin sidebar.
Here you can click packages which will give you options for your site export.
Step 2. Export the Duplicator package
Once on the Duplicator page click “Create New” to start the export process.
Here you’ll have a few options including what is in the export and the name of the package. You most likely won’t need to change any settings so you can just click next.
After hitting next Duplicator will scan your site to see if the export will properly work. If you run into any wall you can email your web host to resolve any issues that may pop up. On our host we didn’t have any issues from the scan.
When you click build the site will be compressed into a package. This is a PHP installer file and a zip file that contains all of the WordPress site’s content and files.
You can download your complete WordPress cloned site by clicking “One-Click Download”. This will give you the PHP file and zip archive.
Depending on your browser you may be warned that the site is downloading multiple files. Just click accept if that appears (like it did in Chrome for us).
Step 3. Upload the Duplicator package to your new (or existing) server
To upload your WordPress site clone you’ll need to have access to your site’s FTP. If you are new to FTP you’ll need an FTP client like Cyberduck which is on Windows/Mac. Typically you can get your FTP login through your web host’s admin page. If you can’t find your FTP login information we recommend emailing your web host.
In this example, we will be making an FTP account in SiteGround. Most hosting interfaces differ but the functionality should be similar.
After you create your FTP login note down the username and password and enter it into your FTP client. We will be using the free FTP client Filezilla in this guide.
It’s important to note if your host uses FTP or SFTP, if your login isn’t working it might be because it’s an SFTP login. This can be changed in the protocol option of your FTP client.
After you are successfully logged into your FTP browse the folders to ensure you’re in the public facing folder. Most hosts call this folder “public_html” or something similar. If you have no folders on your server you are most likely already in the default public folder.
You’ll want to delete any default files in your server as well. You’ll see here that SiteGround adds a default.html file which we won’t need when we import our WordPress site.
Now that we have a fresh public facing folder we’ll upload our Duplicator zip and Duplicator installer.php file. This can easily be done by dragging the files over into your FTP client.
This could take a few minutes depending on the size of your site.
After the uploads finish you’re ready to move to the next step.
Step 4. Create a new database for the new site
Your new WordPress site will need a new database to run on so you’ll need to create one in your web host’s dashboard. Your host’s interface may look different but the functionality should be similar. If you need help creating a MySQL database you can also email your host for support.
In SiteGround it’s as easy as clicking “Create Database” in their site tools.
After creating your database you’ll need to add a database user to it. The database holds your content while the user gives it access. This new username and password will be used in the setup process of Duplicator so make sure you keep it handy.
After you make your database user ensure they have access to the new database you created. In SiteGround you simple click manage access and it should automatically select your database if you have one.
Now that we have a database name, username, and password we can continue to the Duplicator installer.
Step 5. Run the Duplicator installer and finish cloning the website
After adding the files to your server you can access the Duplicator installer by going to yourdomain.com/installer.php. This will run the Duplicator installer which will ask you for your MySQL database details you set up on the previous step.
When you first load the installer it will double-check your hosting environment to see if everything is set up correctly.
Just click the terms and conditions checkbox and you should be able to proceed. If the validation failed, feel free to let us know your issue in the comments and we should be able to help!
After clicking next you’ll be able to enter the database details we created previously. This includes the database name, username, and password. By default Duplicator will delete what is in the database and add the WordPress content. So be careful if you’re running this on an already existing database.
Since you’re most likely moving the site to a new domain the next option will let you select a different URL for the site. By default it will get the correct URL of your new domain so you shouldn’t have to do anything here; especially if it’s a staging site.
In addition to changing the URLs you can also add a new WordPress admin account. This is useful if you’re cloning a site you don’t know the WordPress login to.
After clicking next Duplicator has successfully cloned your site. It’s extremely important to let Duplicator delete the install files, otherwise, someone else can overwrite your site by using the installer.php file. By default, Duplicator will delete these files but it doesn’t hurt to double-check they are gone in your FTP client.
And just like that, you’ve cloned your WordPress site! Just click the “admin login” button and the site should be working as expected.
We hope this guide helped you duplicate a WordPress site if you had any issues let us know in the comments.