Want to safely test out new features on your WordPress website without risking irreversible damage? You’ll need to know how to clone a WordPress site.
A copy will come in handy when you want to migrate your site to a new host or update an existing site without making the changes public.
Cloning is very important. Cloning is very important.
So in this post, I’m going to walk you step-by-step through the process of duplicating your WordPress site. Here is how to clone a WordPress site:
- Install a backup plugin
- Create a backup of your WordPress site
- Upload your backup to a new location
- Run the installer for your WordPress backup
- Test your cloned WordPress site
1. Install a Backup Plugin
The easiest way to clone WordPress sites is to use a backup and cloning plugin. There are many of these plugins available for free, such as Duplicator or All-in-One WP Migration, as well as some paid options like BackupBuddy or WP Migrate DB Pro. Any of these plugins, including the free options, are capable of backing up and migrating a site for beginners and experts alike.
Start by downloading and activating the plugin of your choice from WordPress’ plugin manager.
If you choose a paid option, you may need to download the plugin and then manually upload it to WordPress to install it - but in here, I'll use a free option, so you can tag along without paying.
For this tutorial, I'll use Duplicator to illustrate the steps of cloning your WordPress site, but the process is similar for any backup and cloning plugin.
2. Create a Backup of Your WordPress Site
Backup and cloning plugins work by first creating a backup of your WordPress site and then allowing you to copy that backup to a new location.
Start by navigating to the main page of the plugin you will be using to create your backup and find the option to create a new backup.
Using Duplicator as an example, you would click on the 'Create New' button in the upper right corner to open the Duplicator wizard.
No matter what plugin you are using, you will need to enter a unique name for your backup. It’s always a good idea to put the date of the backup in the name as a quick reference.
Good naming may help you avoid confusion in the future. Naming a backup 'ewfradbsref.zip' may sound like an easy way out - but you might hate yourself for it later.
Once named, continue to the next step of the backup process.
The likely next step of your backup is to scan your website’s entire database to make sure that all of your files are in order. The scan will display any warnings, but if everything checks out then you can continue to create your backup.
If you are using Duplicator, click 'Build' to wrap all of your website’s files, images, templates, and plugins into a single downloadable file.
3. Upload Your Backup To A New Location
You’ll now need to move these files to a new location, either to a site on your local server or a live website.
Download the backup zip folder and 'installer.php' file that your plugin created. In Duplicator, you can click on the 'One-Click Download' link to get save both files at once.
If you are cloning your website to your local server, simply copy and paste the files into your 'htdocs' or 'www' folder within that server.
If you are uploading to a live website, you’ll need to login to your server using an FTP client such as FileZilla. To login, use the credentials you received when signing up with your new website host. Then copy both files to the root directory, which is usually named either 'www' or 'public_html'.
4. Run the Installer for Your WordPress Backup
Now that all of your files are in place, you’ll need to run the installer.php file on your new server. Navigate to your new website, adding '/installer.php' to the end of the web address.
For example, http://wordpresssclonesite.com/installer.php. Remember to replace wordpressclonesite.com with your own domain name or the address of your local host. But you probably understand that.
The installer wizard for the plugin that you used to create the backup will appear on the screen. Check the box to accept the terms and conditions, then hit 'Next' to continue. The wizard will then unpack your backup and ask you to create a new database within your new server location so that it can copy your files, templates, and plugins.
Finally, the installer wizard will ask you to confirm your cloned website’s URL, installation path, and title. The installation path should be the same path address from which you copied the backup files onto the new server. However, the wizard may auto-fill these fields so that you can just click 'Next' to finish the installation.
5. Test Your Cloned WordPress Site
Before you leave the installer, there is one more set of steps to ensure your cloned site is fully operational. The tests that your installer will run may vary in different plugins but as an example, Duplicator has three checks: Save Permalinks, Test Site, and Security Cleanup. Click on each of the three buttons in order to run the tests.
If you followed these steps carefully, your new site now should be up and running. Click on the Login button to continue to the dashboard of your newly cloned WordPress site.
Other Ways to Clone WordPress Sites
In addition to basic backup and cloning plugins, there are several other ways to clone a WordPress website.
You can try out plugins like Migrate Guru or WP Staging that offer integrations with web hosts or greater control for website administrators over the migration process. Alternatively, you can even create a backup of your WordPress database and manually unpack it into a new MySQL server.
However, cloning your WordPress site using a basic backup and cloning plugin is extremely easy and works for a huge variety of websites.
If you have any suggestions on cloning your website, please feel free to leave me a note in the comments below!