Site icon WPBrigade

How to Clone a WordPress Site in 2024 (Step-by-Step)

How to clone a wordpress site

Are you looking for a way to clone a WordPress site? If yes, you’ve come to the right place. 

Cloning a WordPress site is essential for developers, designers, and site owners, whether they are testing updates, migrating to a new host, or creating backups. 

In this article, we’ll explain the different step-by-step methods for cloning a WordPress site. By the end of this article, you’ll learn how to clone your WordPress site.

What is WordPress Site Cloning?

WordPress site cloning is creating an exact copy of an existing WordPress site. This process involves replicating all the existing data, including:

The copy of the WordPress site is stored on third-party platforms, such as Dropbox, Google Drive, FTP, and more.

See the image below:

Cloning a WordPress site is important for protecting it against accidental data loss. It helps you reverse a change made or a mistake caused by human error in no time.

What are the Main Reasons for Cloning a WordPress Site?

Here are the main reasons to clone a WordPress site:

Cloning a WordPress site lets you change, test, and migrate your site securely. It also minimizes risk and downtime.

3 Requirements to Clone WordPress Site

1. A Backup 

There are multiple risks involved in cloning a WordPress site, such as:

To avoid any mishaps, you must create a backup of your site that includes all core files, databases, themes, and plugins.

For this purpose, you’re required a WordPress backup plugin like UpdraftPlus.

With this plugin, you can create a backup for your database, including uploads, plugins, themes, etc., with just a few clicks. However, you have to do it manually.

UpdraftPlus ensures secure backups when they are saved in a remote location, including backups to Dropbox, Google Drive, Amazon S3, and more.

2. Access to the site you want to clone

If you want to clone a WordPress site, you must have access to the back end. 

Before you start, ensure you have the WordPress site’s login credentials, i.e., Username or Email Address and  Password, to access the admin dashboard. It will ensure you’re fully prepared to proceed with the cloning process. 

If you’re not the administrator of the WordPress site, you’ll need all the necessary permissions to make changes to the site. 

3. Access to the Server

You also require complete control over the destination server where you will set up your cloned WordPress site.

It will help you create a copy of your current server with all its applications. Remember, the cloned server will have a different IP address. This is what will make it completely isolated from the current server. 

How to Clone A WordPress Site with Duplicator

You can easily clone your site with a WordPress cloning plugin.

Multiple WordPress cloning plugins, such as Duplicator, are available for free in the WordPress plugins repository. These plugins help you clone a site quickly.

It is one of the best WordPress migrator plugins that allows you to clone a website, create backups, and migrate a WordPress site from one host to another.

Let’s jump right into how you can clone your site with Duplicator.

Step 1. Activate and Install Duplicator

First off, uninstall and activate the Duplicator plugin on your WordPress site.

To do this, go to the left sidebar of the WordPress admin dashboard, navigate to Plugins, and click the Add New Plugin option.

On the next screen, search for the plugin in the search bar, find the plugin in the results, click the Install Now button, and then the Activate button.

Step 2. Create a Duplicator Package

Next, navigate to the Duplicator option from the left sidebar menu and select the Packages option.

On the next screen, click the Create New button.

Now, add a Name for your clone site and click the Next button.

It will automatically scan your site for configuration and system notices.

When done, click the Build button.

Wait a few minutes to build the package.

Step 3. Download Installer and Archive Files

Next, you’ll need to download the Installer and Archive file.

Step 4. Upload Downloaded Files to New Location

Now, you must upload the downloaded files to the new location. The new location depends upon the nature of your site, e.g., WordPress Blog or Local Server.

If you are using MAMP as your local server, your new location will be inside the ‘/Applications/MAMP/htdocs/’ folder.

If you’re planning to clone the site on any WordPress hosting platform, you’ll need to create an empty site first. Afterward, you can upload the cloned files to it via the provider’s file manager.

Note: Here, we’ll show you how to upload cloned files to the Bluehost hosting provider.

To do this, log into your Bluhost account. Then, go to the left sidebar menu, navigate to Websites, and click the Add Site option.

Next, select the Other (empty environment) option and click the Continue button.

Now, choose a site title and click the Continue button.

On the next screen, you can either connect your site with a domain name or use a temporary domain.

After selection, click the Continue button.

Your empty site is ready!

Now, get back to the dashboard and click the Websites option.

On the next screen, you can see your newly created site. Simply click the Settings button.

On the overview screen, click the File Manager button under the Quick Links section. 

On the File Manager screen, click the Upload button.

Next, upload the cloned downloaded files to the newly created empty site. When you’re done, click the Go Back to … link.

Now, you can see Archive and Installer files inside the file manager.

Note: You’re required to remove other files inside this directory to ensure a smooth installation.

Step 5: Create a New WordPress Database 

Now, you’re ready to create a new WordPress database to unlock your cloned WordPress version. 

For this purpose, go back to your empty site’s Settings tab like before.

On the next screen, select the MySQL Databases.

Now, you’re required to type your new Database name.

Now, it’s time to add a new user to the MySQL database.

For this purpose, go to the MySQL Users area section. Here, provide a username and password and click the Create User button.

Once the user is created, you’ve to add the user to the Database.

For this purpose, click the Add User to a Database area and click the User dropdown menu. Here, select the user you just created. 

Note: Remember the database name, username, and password. You’ll need them for the next step.

When done, click the Add button.

In case you are using a localhost, go to the ‘http://localhost/phpmyadmin/’ or ‘http://localhost:8080/phpmyadmin/. 

It will take you to the phpMyAdmin screen. From here, navigate to the Menu and select the Database option.

Next, you’re required to type in the name of the database. Then, click the Create button.

Step 6. Run the WordPress Site Importer Script

Everything is almost set!

The next step is to install and run the Duplicator installer script. This script will open up the archive file with a few clicks.

To do this, enter https://example.com/installer.php in the web browser.

Note: Don’t forget to replace ‘example.com’ with your domain name.

Now, the Duplicator installer script is visible on the screen. First, it will check for the backup and initial Settings. If it is free of any possible errors, simply check the terms and notices box and click the Next button.

Next, type in your WordPress database information, including:

Now, you can click the Test Database button to see if all the information is accurate.

When done, click the Next button.

Next, Duplicator will update and configure files to match your new site’s values, including:

Lastly, click the Admin Login button to finalize your installation.

Congratulations, you’ve successfully cloned your site.

How to Clone A WordPress Site Manually

Don’t want to clone your site using a plugin? Don’t worry! You can also use a manual method to clone your WordPress site. 

Let’s see how you can do this!

Step 1: Connect your Site to a File Transfer Protocol (FTP) Client

You’ll need access to the file transfer protocol client to clone your WordPress site manually.

First off, you’re required to connect your site to a file transfer protocol (FTP) client.

Step 2: Download your Root Directory Folder

After connecting to the FTP client, you have to locate and download your root directory folder. 

It has everything related to your site labeled as public_html.

Next, select all the files inside the public_html folder, right-click on them, and click the Download option.

Step 3: Upload Root Directory to the New Server

You must connect to your new server after creating a manual copy of your root directory.

When done, you need to locate the new site’s root directory. This time, you need to delete all the files inside this folder.

Now, paste the downloaded files into it.

Step 4: Export the Site’s Database

Since your root folder doesn’t have the WordPress database, that’s why you’re required to export your old site’s database. 

For this purpose, go to your PHPMyAdmin and select the Export tab.

On the next screen, choose your export method, including:

Next, choose SQL format for your database export. 

When done, click the Export button. 

Step 5: Set Up the Cloned Database

It’s time to set up your database for the cloned site. 

For this purpose, log into your hosting account and select your database settings. 

This will vary depending on your host. For example, if you’re using Bluehost, go to Advanced, scroll down to the Databases section, and click the Manage button.

Your control panel screen will open up. 

Simply type in the new database name and click the Create Database button.

Next, you need to create a new username and password.

When done, click the Create User button.

Scroll down a bit and create a new user in the database.

Step 6: Import the Database

Now, you must import your old database into the new one for your cloned WordPress site.

To do this, go to the PHPMyAdmin dashboard and select the Import tab at the top of the screen.

On the next screen, select the exported database file. Now, leave all the options as it is, except for the SQL as your format, and click the Import button.

Note: You can stop here if you aren’t moving your domain to a new server. But if you want to move your domain to a new server, follow the last step as well.

Step 7: Update the wp‑config.php File (Optional)

Since you are moving to a new server, you must update your wp-config.php file with the correct database details.

For this purpose, you’re required to access your cloned site’s files via an FTP client.

You’ll find the wp-config.php file within the root directory within the public_html.

Next, select the wp-config.php file, right-click and click the Download option.

After downloading your file, open your preferred text editor, scroll down, and find the following code snippet:

define('DB_NAME', 'database name');

define('DB_USER', 'username for the database');

define('DB_PASSWORD', 'password for the database');

define('DB_HOST', 'MySQL hostname');

Here, you’ll need to update this information with the newly created credentials.

You can also update your domain name. To do this, find the line saying, “That’s all, stop editing! Happy publishing”, and add this code snippet above it:

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

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

Note: There is the possibility that these lines already exist. 

Finally, save the file, re-upload it to your root directory, and replace the old wp-config.php file. 

That’s it! This is how you can manually clone a WordPress site.

What’s Next After Cloning Your WordPress Site?

We hope you’ve successfully cloned your WordPress site. Here is what you can do next:

Which WordPress Cloning Method is Best for You?

You can use a plugin or go manually to clone a WordPress site.

If you manually clone your WordPress site, you have complete control over the process, and there is no need for additional plugins or tools. However, it requires technical knowledge, and there is a higher risk of errors.

On the other hand, WordPress cloning plugins make it easy to handle files and databases. They are reliable, and this is why they are widely used.

The best method depends on your technical skill level, the size of your site, and the specific requirements of your cloning project.

However, considering user-friendliness, plugins are best for beginners.

WordPress Cloning FAQs

What is the difference between duplicate and clone in WordPress?

Cloning a WordPress site means creating an exact copy of a site. On the other hand, duplicating a WordPress site means building a new site with data taken from an existing site’s page.

Why would I need to clone my WordPress site?

Cloning a WordPress site can be helpful for several reasons. One is that it sets up a staging site for testing or moving your site to a new host or domain.

What are the main methods of cloning a WordPress site?

You can easily clone a WordPress site using a WordPress plugin, such as Duplicator, or manually clone it using FTP and phpMyAdmin.

What should I consider before cloning my WordPress site?

Before cloning your site, ensure you have access to FTP and phpMyAdmin. You should also back up your site and database to prevent data loss.

Is cloning a website bad for SEO?

Remember, copied content can badly affect your site’s SEO. Search engines charge your site with duplicate content penalties.

Clone a WordPress Site: Final Words

To sum up, we hope you’ve learned how to clone your WordPress site easily.

We have shared a step-by-step easy guide covering 2 methods. Choose the method that aligns with your level of expertise. 

That’s all for this article!

We hope you enjoyed reading this article. It may also be a great time to dive into some other helpful WordPress articles:

Exit mobile version