How to Clone a WordPress Site (Complete Guide)

Bulletproof Backups for Your WordPress Website

Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

A clone is a person or thing that is an identical copy of another. Regardless of your thoughts on animal (or even human) cloning, cloning a WordPress site, i.e., making an exact copy of it, can be useful in certain scenarios and doesn’t raise any ethical issues. If you want to learn how to make an exact copy of a WordPress site, you’ve come to the right place.

TL;DR: duplicating a WordPress site on your own can be cumbersome and takes a non-trivial amount of time and effort. The best way to copy a site is to use a WordPress staging plugin. It can make an exact copy of your website in seconds and with only one click of a button. Moreover, once you’re done experimenting with the cloned site with the staging feature, you can easily push the changes to your production site from the same interface.

What is WordPress cloning?

As I mentioned earlier, WordPress cloning simply means creating an identical copy of your WordPress site. It can be to test changes, update plugins or themes, etc.

Technically speaking, when you back up your website, you create a ‘clone’ of it and store it somewhere. However, that’s not what we mean when we talk about cloning in the context of websites. For us, the term means creating an exact, fully operational copy of a website in a particular location; that is, a website that behaves just like your production site.

In contrast, when you back up a site, you create an ‘inactive’ copy of it as a safety net. Now, there might be a few reasons why you may want to clone a WordPress site, reasons that I’ll describe in detail later in the article. For now, let’s fire up the WordPress Site Replicator 3000 (WSR-3000) cloning machine!

How to clone a WordPress site using a plugin

Using a staging plugin to clone a WordPress site is the easier of the two methods I’ll describe in this article. A plugin can save you a lot of time and effort vis-à-vis doing it yourself. For this article, I’ll use the excellent BlogVault plugin to demonstrate the process to clone a WordPress site without access to FTP. Using its staging feature, you can quickly make a password-protected clone of your website.

You don’t need to worry about creating a subdomain or performing a WordPress migration, and you don’t need to pay for additional hosting for the clone. BlogVault will host the cloned site on its own, powerful cloud-based servers. Moreover, it’s very easy to use and comes with a clean, minimalist UI. Here are the steps:

  1. Install and activate the BlogVault plugin on your WordPress website. As soon as you activate it, you’ll be taken to a page where you’ll be asked to sign up for an account. Enter your email address, agree to the terms and privacy policy, and click Submit to continue.
Singup to Blogvualt
  1. As soon as you’ve signed up, BlogVault will start taking a backup of your site automatically. Once the backup is complete, go to the dashboard and under the Staging section, click on Add Staging.
Click on add staging
  1. On the next page, choose the version of your site that you want BlogVault to clone as well as the PHP version. This is one of the many USPs of BlogVault. It stores multiple backups of your site, giving you the flexibility to test things on older versions of your site up to a year ago. Click Continue to proceed.
Click on continue to create cloning site
  1. BlogVault will now start the site clone setup process. On the next page, you can see the progress it has made. Once the process is complete, it will notify you and present you with a set of credentials for accessing the cloned site. These credentials ensure that you, and only you, will be able to access the site. Click on Visit Staging to access the clone it just created.
cloned website setup succesfully

Congratulations! You now have an exact, fully operational copy of your WordPress site that you can experiment with. To access the cloned site’s dashboard, go to the URL that you get by appending /wp-login.php to the staging site URL. Note that you have to enter the same WordPress login credentials that you use for your live site to access the cloned site’s dashboard as well.

If you made some changes to your cloned site and want to replicate them on your live site, you can do so by going to the BlogVault dashboard and clicking on Merge in the Staging section.

click on merge to push clone site to live site

How easy was that? You see, BlogVault is the best way to clone a WordPress site. Besides being quick and easy to clone a site with BlogVault, here are some other reasons why you may want to choose BlogVault over other methods:

  • It automatically prevents Google and other search engines from crawling the cloned site, which would otherwise affect SEO performance due to duplicate content.
  • You don’t need to pay for additional hosting. BlogVault will host the cloned site on its own, powerful cloud-based servers.
  • SSL support for the cloned site.
  • It password-protects your cloned site.
  • Many business-critical websites have email sequences that are triggered based on certain events. BlogVault automatically blocks all emails from being sent out from clones of such sites, so you don’t need to worry about unintentional emails.
  • Every cloned site gets SFTP access for secure file transfer.
  • The cloned site gets phpMyAdmin support, so you can carry out any database operation easily.

How to clone a WordPress site manually (Without a plugin)

You don’t have to use a plugin to clone a WordPress site if you don’t want to. If you’re a DIY person, you can do the cloning yourself. However, note that the manual procedure isn’t as simple, will take a lot of time, and is error-prone. Moreover, unlike using BlogVault, you’ll need a spare domain name and access to a server, either web-based or local, to host the cloned site. Therefore, I urge you to give BlogVault a try before proceeding. It will save you a lot of time and effort.

Here are the steps to manually copy a WordPress site:

  1. Create a copy of your site files and download it to your computer.
  2. Upload the copy to a web server.
  3. Export your live site’s database.
  4. Set up a database for your site’s clone.
  5. Import your live site’s database into the clone’s database.
  6. Edit the wp-config.php file

For this section, I’ll use FTP to access WordPress, which is a protocol that defines how files should be transferred over the Internet. To use FTP, you need an FTP client. I’ll use FileZilla, which is easy to use and pretty popular. Let’s get started.

Step 1. Create a copy of your site and download it to your computer

To create a local copy of your live site, you’ll essentially download the WordPress installation directory. This directory is usually public_html or www by default.

  1. Connect to your live site in FileZilla using your FTP/SFTP credentials.
enter FTP details in filezilla
  1. Navigate to the directory where you want to download the copy of your live site in the left-hand pane labeled Local site.
  2. Download the root directory of your live site, where you installed WordPress, to the local directory mentioned in the step above.
download public_html folder

Depending on the size of your live site, it will take quite a while for FileZilla to download all your WordPress files and folders. In my experience, I’ve found FTP to be agonizingly slow, which is another reason to use BlogVault for cloning instead.

Step 2. Upload the copy to a web server

  1. Connect to the web server that will host your site’s clone.
  2. Upload the directory that you downloaded in Step 1 to the server’s root directory.

Step 3. Export your live site’s database

To export your live site’s database, you’ll first need to launch the corresponding database manager. The two most common ones are phpMyAdmin and Adminer. I’ll use Adminer to illustrate the steps in this section. The steps are essentially the same for phpMyAdmin.

  1. Open the Adminer dashboard for your live site. It should look something like this:
export live site database
  1. Click on Export from the left-hand pane.
  1. Select ‘save’ as the output, SQL as the data format, and then click on Export.
  1. In the pop-up window, give the SQL file a suitable name and download it to your computer.

Step 4. Set up a database for your site’s clone

Every WordPress site needs a database to store its content and settings, and your site’s clone is no exception. In this step of the cloning process, I’ll set up a new database for my live site’s clone. To illustrate this process, I’ll use Bluehost. The steps should largely be the same for any other web host.

  1. Go to Advanced > Databases from the left-hand navigation menu.
  1. Under the section ‘Create New Database,’ provide a name for your new database, then click on Create Database. In my example, I’ve named the database ‘mybhsite_home_for_new_database.’
  1. Now, we’re going to add a new database user for our account. Scroll down to ‘Add New User’ under ‘MySQL Users.’ Choose a username and a strong password for this user, then click on Create User to finish.
  1. Now, add the user you created in Step 3 to the database you created in Step 2 as shown in the image below.
  1. On the next page, assign all privileges to this new user and then click on Make Changes.

Step 5. Import your live site’s database into the clone’s database

I’ll use Adminer again to illustrate the steps.

  1. Launch the database manager of your website clone’s web host. 
  2. Select the database you created for your site’s clone, then click on Import.
  1. Choose the correct SQL file to import, and then click on Execute to start importing.

It can take a while to import the data if your live site’s database is huge. After a successful import, you’ll see a confirmation message.

Step 6. Edit the wp-config.php file

The wp-config.php file is a critical file of your WordPress installation. It is located in the root directory of your website and contains your website’s base configuration details, like database connection information. This file is what WordPress consults to communicate with the database. So, if it isn’t configured with the correct database information, a visitor won’t be able to access the site.

In this step, you’ll modify the wp-config.php file so that it contains the correct database information.

Navigate to the cloned site’s root directory from the ‘Remote site’ area of FileZilla, then download the file. Modify the following lines of code with the new server’s MySQL database credentials:

define('DB_NAME', 'new database name here');
define('DB_USER', 'username for the new database');
define('DB_PASSWORD', 'password for the new database');
define('DB_HOST', 'new MySQL hostname');

Next, add the following lines of code below the line that says “That’s all, stop editing! Happy publishing.”, replacing “newdomain.com” with the correct domain of your cloned site:

define('WP_HOME', 'http://newdomain.com');
define('WP_SITEURL', 'http://newdomain.com');

Save the file and re-upload it to the root directory of your cloned site in FileZilla.

And that is it! You now have a fully operational clone of your live site.

When and why you should copy a WordPress site

There can be several reasons why one may want to duplicate a WordPress site. I list some of the common ones below:

  • You want to install or update plugins and themes without the risk of breaking your site. It’s especially useful for plugins and themes that haven’t been tested for compatibility by their developers.
  • You want to move your site to a new domain name or a web host. In this case, cloning your site will speed up the migration process.
  • You’re developing a site for a client on your own computer or server. After you’ve finished, you can simply clone the website on the client’s web server.
  • You want to create a staging site for your production site so that you can work on a redesign or make significant changes without affecting the experience of your readers.

Conclusion

Regardless of your reason to clone a WordPress site, note that it can be a slow, headache-inducing process if you go about doing so on your own. You can save a lot of time, effort, and potential headaches if you choose BlogVault. With BlogVault, you can clone your site easily in a few clicks. Moreover, it also allows you to selectively replicate any changes you made to your cloned site at your production site with a single button click.

FAQs

Q – What is the easiest way to copy a WordPress site?

A – The easiest way is to use BlogVault, an excellent plugin with which you can

Tags:

You may also like


repair wordpress installation
Repair WordPress Installation In 6 Simple Ways

Is your WordPress site currently facing errors, running slower than usual, or even completely offline? If you’re struggling with the white screen of death, database connection errors, or malware warnings,…

How to Take a cPanel Backup
How to Take a cPanel Backup

Every website admin knows that backing up your website is important. The worst case scenario is not being able to restore a crashed or hacked site. Good backups are like…

How Often To Backup A Site
How Often To Backup A Site

In today’s digital age, safeguarding your data is more crucial than ever. There is also an abundance of advice on when to take website backups and how often to take…

How do you update and backup your website?

Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.

Updating Everything Manually?

But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.

Backup Your WordPress Site

Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.