The idea behind cloning a website is simple – create an exact replica of your website.
Clone websites come in handy when you are trying to do any of the following:
- Create a staging site to test plugins, updates, designs, etc.
- Working on a client website on your local server.
- Moving to a new hosting server and setting it up exactly the way your old site is set up.
- Changing your domain name in which you’ll need to clone your site partially and move it to a new server.
- Moving WordPress site to root
Cloning a site on your own is a daunting task. But don’t worry, we’ve created a guide with detailed instructions on how to clone a site. It’ll make cloning websites a breeze.
To clone a WordPress Site, all you need to do is sign up with BlogVault Staging. It will clone your site in under a few minutes. In addition, once you’re done experimenting with your clone site, you can easily push those changes to your live site with just a click of a button.
How to Copy a WordPress Site?
You can clone your website in two ways:
1. Using a plugin (the easy way)
2. Manually (the hard way)
There are a few WordPress plugins that’ll help you clone your website. But for the purpose of this tutorial we are choosing BlogVault because it’s a no B.S. extremely easy plugin to use. It will help you clone any WordPress site.
IMPORTANT: BlogVault not only clones your site quickly, but enables you to push the changes you make from your clone WordPress site to your live site easily! We talk more on this in the steps below.
I. Clone Your Site With a Plugin
Step 1: Sign up with BlogVault and install the plugin on your WordPress website. It’ll take a backup of your site automatically. The time taken to create the backup depends on the size of your site. But the process generally takes only a few minutes.
Step 2: From the BlogVault dashboard, select Add Staging. The plugin will start creating a clone of your website. Again, it takes a few minutes to clone your site which depends on the size of your site.
Step 3: When the process is complete, you can access your cloned site by clicking on a small arrow in the staging section.
The URL of your cloned site will look like this –
Step 4: The cloned site is password-protected to prevent unauthorized users from accessing the site.
You’ll find the username and password in the Staging section. You need to use them to access your site.
Step 5: After you make changes on your clone site, you don’t have to replicate them on your live site.
BlogVault has a feature called ‘merge’ which enables you to push your changes from the clone site to live site.
To merge your site, go to the BlogVault dashboard, navigate to Staging and then click on Merge.
BlogVault allows you to selective merge where you can choose whether you want to merge all the changes or a few. The changes will be replicated on your live site in a few minutes.
That’s it! You’ve cloned your site and merged your changes successfully using the BlogVault plugin. In the next section, we’ll cover the manual method of cloning your site.
II. Clone Your Site Manually
You can clone WordPress site without plugin but we must caution you that the manual method isn’t for the faint-hearted. It’s complicated, prone to error, and time-consuming! If you insist on proceeding,please tread with CAUTION.
Now, let’s dig into how to manually copy WordPress site –
NOTE: To clone and migrate your website, you need to have a new server and a new domain name. You can purchase this from a web hosting provider and a domain registrar.
Step 1: Create a Backup Copy of Your Site
You can download a backup copy of your website from your hosting provider or from a backup plugin like BlogVault.
If you already have a plugin, you can use it to download a copy.
If you don’t have a backup system in place, you can take a backup of your site right now with BlogVault.
Sign up with BlogVault and install the plugin on your WordPress website. It’ll take a backup of your site automatically. The time taken to create the backup depends on the size of your site. But the process generally takes only a few minutes.
BlogVault backups up your database and files. Both are important parts of your website.
When the backup is ready, you can proceed to download it.
Step 2: Download a Copy of Your Website
You’ll need to download database and files as we’ll need both of them to clone WordPress site to another server.
To download a backup copy of your WordPress site, log into your BlogVault dashboard.
→ Go over to the Backup section and click on the arrow on the right.
→ Then click on the Download Backup button.
→ On the next page, there is a section called Selective Download. Where you can choose whether you want to download the files or database or both. Select both. And click on Continue.
→ When the files are ready, BlogVault will give you a Download Link. When you click on it, the file will be downloaded on your computer in a zipped folder.
→ Open the zipped folder, you will see a number of folders. We’ll separate files from the database because it’ll reduce confusion when you upload them on a new server.
The database will be named bvfulldump.sql. Place it in a separate folder named database.
Move the rest of the files and folders to a new folder called ‘WordPress files.’
When you are ready, let’s move to the next section.
Step 3: Upload the Backup Copy to a New Server
To finish the cloning process, you need to upload your website to a new server. This could be a local hosting environment or an online server.
But hold on!
To proceed you first need to have your FTP credentials ready. Why?
You will need FTP to upload your website to the new server. The server is a protected entity. To access it, you need a username and password.
We made a few videos explaining how to get FTP credentials from your hosting providers. If this is not helpful, you need to talk to your hosting support.
Going forward, there are four steps that you need to perform –
Let’s start with –
i. Upload the Files
You need to access the backend of your hosting provider. A safe way to do that is by using an FTP client like Filezilla.
1. Download Filezilla, and install it on your computer.
2. Enter your FTP credentials to connect your new hosting server to your computer. This will enable you to upload the files and database from your computer to the new server.
3. After the connection has been established, you will see the folder appear on the right-hand side of Filezilla. These are folders from your new server.
4. You will need to upload your old WordPress files in your root directory called the public_html folder. You need to ensure that this folder is empty except for an installer.php file.
To upload the old WordPress files on your new server, you need to follow the steps below –
- Select the public_html folder.
- Then select the WordPress files folder that we had created in Step 2.
- Select all the files within that folder and right-click.
- Select Upload.
All files from your WordPress folder will be moved to the root directory of your new server.
After uploading the files, it’s time to upload the database.
ii. Upload the Database
The process to upload the database differs from one hosting provider to another.
- For instance, on FlyWheel we found that you had to log into your account and then navigate to Advance and then Import the database.
- But on Bluehost, after logging in you’ll need to navigate to MySQL Database. Then you’ll Create a New Database and Add a New User.
Our Advice: Look for help documents from your hosting providers that explains how to create and upload a new database.
We have a brand new Bluehost account. In the following section, we’ll show you how we uploaded a database on Bluehost.
1. Log into your Bluehost account and then navigate to the cPanel > MySQL Database > Create a New Database.
As the name suggests, you need to create a new database here.
2. Next, you’ll need to create a new user for the new database. This will help you access the database.
On the same page where you created the database, scroll down and you should see a section that allows you to create a new user.
3. The final step is to add the new user to the new database.
Again, on the same page where you created the new user, scroll down till you come to a section where you can Add User To Database.
You have successfully created a new database. Now we need to upload the old database to the new one.
4. Open your cPanel again. And select phpMyAdmin.
5. On the next page, select Import and upload the database from your computer.
Depending on the size of the database, it may take a few minutes for the database to upload.
IMPORTANT: Now that both your WordPress files and database are uploaded, there is just one more thing left to do – connect your site with your database.
To do this, you need to modify your wp-config file.
iii. Modify wp-config file
Right now, your config file contains information about your old database.
The name, username, and password present on your config file are part of your old database. You need to replace them with the new credentials that you just created.
1. Go back to your hosting account and navigate to your cPanel > MySQL Database to get your new database credentials.
2. Then, open FileZilla and select the root directory, i.e. public_html folder.
3. Inside the folder, you will find the wp-config. php file. Right-click and select Edit to edit the folder.
4. Replace the database name, database username, and password with the new ones and then close the window. Almost immediately a pop-up appears asking if you want to save the changes. Select Yes.
iv. Update Domain Name
At this point, you’ve uploaded a copy of your WordPress files and database to a new hosting server. But your domain still points to your old server.
If you open your new domain, it’ll display content from your old server, not the new cloned one.
So what you need to do is follow the steps below –
1. Open your hosting account and go to cPanel > phpMyAdmin. Select the wp_options table.
2. Locate the site URL and home URL. They contain your old URL. Replace them with the new ones.
You can do that by clicking on Edit.
3. Your domain name has changed but what about your published posts and pages? To change them to the new URL you need to access your WordPress dashboard and install this plugin – Velvet Blues Update URLs.
- After installing the plugin, go to Tools > Update URLs.
- Write down your old URL and the new one.
- Check all the boxes.
- Click on Update URLs NOW.
All published pages and posts will be pointing at the new domain name.
With the modification of the URL, we’ve come to the end of how to copy a WordPress site.
Now open your website on a new tab and if everything went well, your cloned website is ready.
We wrote the article to help our readers clone their websites. In the process, we discovered how difficult it is to clone WordPress site manually.
As a result, we’ve become more confident and proud of the product that we offer. BlogVault Staging automates the whole process which means you can clone your websites faster and without the risk of an error.
Some of the benefits of staying with us include:
- Having a password protected cloned site which means no unauthorized person can access it.
- Preventing search engines from crawling your site which helps you avoid plagiarism penalty.
- Merging your cloned site with the live site if you want.
Clone Your Site With BlogVault Staging!