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.
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
Video Tutorial
Don’t feel like watching a video?
Here is our full step-by-step guide to cloning 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 logging into your admin dashboard and clicking Plugins/Add new on the sidebar. 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.
Duplicator plugin in the “Add Plugin” page
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.
Duplicator settings in the admin navigation
Now let’s going into detail about the site export process.
Step 2. Export the Duplicator package
Once on the Duplicator page click “Create New” on the top right to start the export process. The “package” Duplicator will make will include your themes, plugins, media, and content (everything on your site).
Creating a new package in Duplicator
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 errors 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 system 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.
Download your duplicator package
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).
Now that we have our website packaged up it’s time to more it to our new server.
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 free 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 and they should be able to walk you through logging in.
Popular FTP clients for WordPress users
Cyberduck (Free on Windows/Mac)
Filezilla (Free on Windows/Mac)
WinSCP (Free on Windows)
Transmit (Paid on Mac)
In this example, we will be making an FTP account in SiteGround. Most hosting interfaces differ but the functionality should be similar.
Creating an FTP account in SiteGround
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.
Enter FTP info into Filezilla
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 (SFTP is typically common now). 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. If you can’t find your default public folder we recommend reaching out to your web host for the exact path.
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 (just be certain you aren’t deleting anything important).
Delete default files from your server
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.
Video Player
00:00
00:07
This could take a few minutes depending on the size of your site. Most FTP clients will tell you the time remaining during the upload.
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.
Creating a MySQL database in SiteGround
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.
Creating a database user in SiteGround
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.
Duplicator installer step 1
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.
Duplicator installer database options
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.
Duplicator URL options
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.
Creating a new admin account with Duplicator
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.
Note: If you see a blank WordPress site after installing you may need to change your table prefix in wp-config.php. All WordPress databases use a table prefix when storing your site in the database. So if you are migrating to an existing (blank) WordPress install you may need to change this option. You can just go to your original server’s wp-config.php file and see what the table prefix was set to previously and use that variable on your new server’s wp-config.php file
We hope this guide helped you duplicate a WordPress site if you had any issues let us know in the comments.
Bình luận