Do you need to clone your WordPress site before migrating to a new domain or hosting provider?
Using a WordPress plugin like Duplicator, you’ll be able to create a fully operational copy of your site. This can be used for safe migrations, domain name changes, or file edits.
In this tutorial, we’ll show you how to clone your WordPress site!
Why You Might Need to Clone Your WordPress Site
To get started, you’ll need to know what ‘cloning’ is. Put simply, cloning involves saving a copy of your website in a new location. This is an exact copy that is fully operational.
Although this might seem similar to a backup, there is an important difference. When you back up your site, you’ll save a dormant, inactive copy. If you accidentally break something on your live site, you can restore this saved backup.
A clone is an exact duplicate of the WordPress site, except it’s independent and fully functional. You can change the cloned copy without affecting your live website.
Here are some reasons you might want to clone a WordPress site:
- Creating a staging site: On a cloned site, you can perform updates, install software, and edit files without breaking your live site.
- Migrating your website: If you’re moving to a new web host, you can clone the original site and set up the cloned version on the new server. This prevents any downtime that could harm your User Experience (UX).
- Moving to a new domain: Similar to hosting migration, cloning can help you transition to a new website with a different domain.
Additionally, website clones can be helpful for web developers. Instead of working on the live site, you can clone your client’s website to a subdomain. Using this staging environment, you’ll be able to make changes safely.
How to Quickly Clone a WordPress Site (Step-By-Step Guide)
As a beginner, cloning may seem like a difficult process. To help you get started, we’ll show you the best way to clone a WordPress site!
Step 1: Download the Duplicator Plugin
To easily start cloning your website, we’d recommend installing Duplicator. With over 1 million active installations, our plugin is the most popular option for WordPress migrations:
Using Duplicator, you’ll be able to copy your WordPress site to a different domain, web host, or local environment. Plus, you won’t suffer from any downtime.
First, choose your preferred license for Duplicator Pro. Although you can download a free version, our premium subscriptions include drag-and-drop installations, cloud storage, automatic backups, and much more.
Once you download Duplicator, you’ll need to add it to your website. If you’re new to WordPress, check out this guide on how to install and activate plugins.
During the checkout process, you’ll get a license key for Duplicator Pro. Before you start using the plugin, go to Duplicator Pro » Settings » Licensing:
Then, paste your license key into the Activation settings.
Step 2: Create a Duplicator Package
After activating Duplicator, you’ll need to create a package. This will bundle together your plugins, themes, database, and other WordPress files. Then, you can easily migrate this package to a different server.
To do this, find Duplicator » Packages » Create New:
On the next page, give the package a name. You’ll also be able to customize the storage location and archive files. If you don’t need to make any changes, click Next:
Duplicator will then scan your website. You’ll receive evaluations for your WordPress setup, files, and database:
Even if you see a notice pop up, you can continue with the build process. Once you hit Continue, Duplicator will create your cloned package.
On the Packages page, you’ll see an Installer file and an Archive zip file. Before you move on to the next step, download both of these:
Tip: Duplicator is also a WordPress backup plugin. Once you download your site’s package, you can restore these files whenever you need to.
Step 3: Upload the Cloned Files to Your New Server
Once you have a cloned copy of your WordPress site, it’s time to upload it to a different location. If you’re migrating to a new hosting provider, you’ll need to open your site files using a File Transfer Protocol (FTP) client or cPanel. This will depend on your host’s requirements.
If you need an FTP client, you can download FileZilla. This free software makes it easy to connect to your site files and start editing them:
At the top of the FileZilla window, enter your host name, username, password, and port number. Usually, you can find this information in your hosting dashboard:
After you hit Quickconnect, you’ll see your site files on the right-hand side. Next, open the root directory, which is the public_html folder. Here, upload your Duplicator package:
You should see both an installer.php file and a zip file containing your WordPress data. Be sure to delete any other files from your public_html folder.
Step 4: Create a Database for Your Cloned Site
For a WordPress website to function properly, it needs a database. After you’ve uploaded your cloned files, it’s important to create a new database to store its data. This will enable Duplicator to move information from your old database to the new one.
Your web host will likely provide a way to edit your database from your control panel. For example, Bluehost has a setting for MySQL Databases:
After clicking on this, look for the option to create a new database. Give it a name and click on Create Database:
Now, you’ll need to add a new user for the database. In the MySQL Users section, enter a new username and password:
You’ll also need to assign that user to the new database:
For the next step, be sure to remember your database information!
Step 5: Run the Duplicator Installer
Finally, open a new browser window. In the search bar, enter your full web address followed by ‘installer.php’. Here’s an example:
On the Duplicator installation page, find the Setup section. Here, enter your host name, database name, username, and password:
Then, scroll to the bottom and hit Validate. Duplicator will then test your database for the correct backup files and settings. If everything is working correctly, select the terms and notices checkbox and click Next:
At this stage of the cloning process, Duplicator will import your database and finish the installation. If it is successful, you’ll see an Admin Login button:
You can then log into the WordPress dashboard for your new site! This new WordPress installation will look and function exactly like the original website.
By now, you can clone your WordPress site to a new staging environment, domain name, or server!
Before you clone your website, you might want to save a copy of your original site files. To help you do this, check out our guide on backing up WordPress.
Are you ready to clone your existing website? Download Duplicator Pro today!