Simple Instructions for Cloning Your WordPress Website

Simple Instructions for Cloning Your WordPress Website

For certain types of updates and changes, it is essential to clone a WordPress website for paramount tasks without risk, especially if a business is at stake. One of the great advantages of WordPress, and the reason why it has grown so much in recent years, is the large community of developers behind it, who are in charge of revising it and keeping it always up to date, correcting errors, solving possible security breaches, and implementing improvements.

Normally, minor updates, both to the core of WordPress and to plugins or themes, do not usually cause problems and can be activated without further ado. Always have, yes, a backup of your WordPress installation. 

Changing the theme of your WordPress website or testing the functionalities of a plugin are some cases in which it is convenient to duplicate the WordPress website’s complete installation to carry out tests in a similar environment but separate from that of the live website.

Although in this article I will focus on how to create a clone of your WordPress installation to make tests or changes, these methods are equally useful for duplicating WordPress on another hosting or server or cloning your website on a new domain.

Ways to duplicate or clone a WordPress website

There are several ways to make a duplicate of a WordPress website to carry out tests or changes without risk. One of them is to import the entire website from the server where it is hosted and install it on a local server on your computer.

If you have enough knowledge and patience, you can download the full WordPress installation using an FTP program like Filezilla, make a copy of the database, and install it all on your computer using local server install software like Xampp, UwAmp, or  Local by FlyWheel, which is the one I usually use.

Working locally with an Apache + MySQL server is comfortable because you don’t have to depend on the connection. But when it comes to WordPress, what works locally may not work well on the final domain due to configuration differences between your computer and the server where the website is hosted. So it is best to do it on a subdomain of the same server, using the same configuration and hardware as the web in production.

Duplicate a WordPress website manually.

This procedure is usually sloppy and complicated, but sometimes the only one possible is if your server gives you an error when using other plugins.

And although there are plugins that facilitate the process, such as Duplicator or UpdraftPlus Premium, it requires several steps and can be somewhat complicated and cumbersome.

The steps to follow are the following:

  • Create a subdomain and an FTP account to access it.
  • Create a duplicate of the WordPress database
  • Update all database URLs from https://mydomain.com to https://mysubdomain.mydomain.com
  • Undertake via FTP, the downloading of all files of
  • WordPress installation in production
  • Edit wp-config.php and change the connection data to the database.
  • Upload all files to the subdomain.
  • Staging: Create a duplicate of your website for testing
  • This is done through staging, which is the procedure of making a clone of your site that will be in another « stage » or stage.

What does that mean? This clone will be a  twin website with a different URL from the one shown publicly, and it is kept private to test new features or make changes or improvements to the website. Instead of being in the production stage, it will be in the development stage.

Without a doubt, the easiest and most comfortable way to stage is through the tools provided by specialized hosting services.

For example, some hosting providers have their own staging tool with which you can create and modify copies of your WordPress site from cPanel.

Before publishing your website, the tool will create a backup of the production copy in case you need it.

However, not all hosts have it, and many times only the most advanced hosting plans include the possibility of working in staging.

Clone a WordPress website with WP Staging

WP Staging – DB & File Duplicator & Migration is a WordPress plugin that allows you to create a staging site for your website.

  • Install WP Staging
  • As always, in these cases: plugins, add new(1), search for it (2) you install and activate it. (3)
  • Install and activate the WP Staging plugin
  • Pay attention to relevant information
  • Once installed and activated, you land on the page from where you can duplicate your website.

Clone WordPress with WP Staging

WP Staging is well tested, and we did a lot to catch every possible bug, but we can’t handle every possible combination of servers, plugins, and themes. Before you create your first test site, it is highly recommended that you make a full backup of your website first!

Never make important changes to your website without having a backup. In fact, you should have an automated backup system to do them regularly, which is easy with the  UpdraftPlus plugin.

Analyze the site before creating a clone

Pressing the “CREATE NEW STAGING SITE” button performs an analysis of your site, after which you will have to review some configuration options, such as the name that you will give to the test clone (1) and the tables (2) and files and folders (3) to be duplicated.

WordPress clone setup with WP Staging

Normally you shouldn’t exclude anything, but there may be an installation that contains special tables or files that don’t have to be copied.

Start cloning the WordPress installation.

Your initial action is to give the clone that will be created a name. In my case, I have called it a « test clone »  in a show of originality.

Start cloning WordPress

Once the clone is named, press the “START CLONING” button to start the cloning process. The machinery starts to work, and after a time that depends on the size of your website and the power of the server you have contracted, the process is completed.

Before accessing your test site,  keep two things in mind:

Permalinks are not active on your test site. This means that you will not have friendly URLs. This is generally fine for a staging website, as in 99% of cases, you don’t need to activate permalinks.

Always verify that you are working on your staging site, not your live site. This detail is very important because sometimes we get confused and make changes where it doesn’t belong. The top bar of the testing site will be orange.

Access the clone of the WordPress site

Click the “Open staging site” button and access the clone with administrator credentials.

Access the clone with administrator credentials

  • Clone a WordPress website on another hosting with Duplicator
  • Using the Duplicator plugin is one of the easiest ways to create a duplicate of your website.
  • In addition, it has the advantage that you can exclude some directories from your server so that they are not included in the copy if your website is very large or contains many images and documents.
  • You will need to have created the subdomain (or local folder) and a database where the new WordPress installation will go.
  • Install and activate the plugin
  • Create a package. If the site is very large or on the server you have folders that correspond to other sites or files outside of WordPress, add the exception in the Files section. You can add folders such as uploads or cache.
  • Once the package is created, download it along with the installer file ( installer.php ) to your hard drive and upload them via FTP to the appropriate subdomain or folder.
  • Run the installer at http://sub.domain.com/installer.php and follow the instructions. You must indicate the new domain to automatically replace all the URLs and the destination database.

Create a WordPress website clone with Duplicator

If the site is not too big, the process is quick, and you don’t have to worry about changing site URLs. However, the process is unique, and every time there are changes to your production website, you will have to re-create the entire package (or make the same changes to your staging site). Likewise, once updates and changes have been tested on the staging site, you will need to manually make the same changes on your production site.

Apart from testing, this is the method I usually use to clone a WordPress website on a new hosting or even to duplicate a WordPress installation on another domain.

Considerations when cloning a WordPress website for staging

Although the process of duplicating WordPress is not complicated,  there are several points to keep in mind when creating a staging version :

  • In reading settings, you must check the option « Discourage search engines from indexing this site.»
  • If you are going to keep the staging site for a long time, it is recommended to block access by password to ensure that no one accesses it. You can harness Restricted Site Access plugins. 
  • Disable the analytics and sitemap plugins.
  • If your email marketing system is
  • MailRelay, Mailchimp, or Mailpoet, check that there are no scheduled newsletters (autoresponders or regular newsletters).
  • Be careful if you have  scheduled posts  and automatic network publishing plugins ( Revive Old Post  or similar)
  • And in general, disable any plugin or functionality that can publish the staging URL  in external media or send emails.
  • Once you have made the changes and implemented them on the production site, it is worth reviewing the basic WordPress configuration to ensure that everything is going to work correctly and that you review the factors that influence the site’s loading speed. Website.
  • WP Staging is a very powerful tool to use whenever you want to do something without the risk of screwing up, and, in its paid version, it also allows you to upload the changes made on the test site to the production website.

Note: Although theoretically, you can do the reverse process and, once the updates are done, send the staging copy to production; In these processes, there is always a risk that the copy will not be carried out correctly or that the sending of data will be interrupted and cause an error. So I recommend you to make the changes on the production site manually once tested in the test version.

Wrapping up

It seems like an arduous task, but creating a duplicate of a WordPress website is necessary for testing before installing updates and making changes to eCommerce sites, membership sites, online courses, and, in general, all those in which a malfunction can directly harm the business.

You can see that cloning a WordPress website does not require great technical knowledge but a lot of time and discipline. So, perhaps you should consider hiring a specialized professional who will make sure that you have a duplicate of your website with guarantees and, above all, without you having to take time away from what is important to you.

Say hello to HostRooster, the ultimate one-stop-shop for all your entrepreneurial needs! From website hosting to freelance services, HostRooster is the platform that puts the power of success in your hands. Think of it as a matchmaker for your dreams and your website – HostRooster connects you with the tools and services you need to bring your ideas to life. No more juggling multiple platforms and providers, HostRooster has got you covered. So why wait? Sign up today and join the ranks of the world’s greatest entrepreneurs. With HostRooster, the sky’s the limit! “Successful people do what unsuccessful people are not willing to do.” – Eric Thomas “Don’t wait for opportunities, create them.” – Anonymous “Success is not final, failure is not fatal: it is the courage to continue that counts.” 


Posted

in

,

by

%d bloggers like this: