The ideal of cloning a WordPress website is common among webmasters nowadays. This practice saves you much time and energy when you migrating your site to a new web host or a new domain. If you are going to have a test on your plugins, templates and other projects, having your live site cloned to a local server can give you the most accurate result. In the following, we’d like to come out a detailed tutorial about how to clone a WordPress website.
Why You Clone Your WordPress Website
Website cloning means that you are going to make a duplicate site with the 100% identical contents, designs, plugins and widgets. This is a common practice when you are under the following situations.
- You have developed templates, plugins or some add-on tools. You can clone your website and run it on your local server. In this way, you can have a proper testing on your projects without affecting your online website.
- You want to move to a new domain or get your website hosted with a new hosting provider. In this case, you can make a copy of your website, which saves you much energy on website migration.
How to Clone a WordPress Site
As for the cloning of your WordPress websites, you can choose to do it either manually or via a WordPress plugin.
- Use the File Manager from your control panel and check the box of “Show Hidden Files” when opening your directory. Here, you can copy all the website folders and files from your current directory. Then, simply upload them to the new location.
- Create a new database for your duplicate website and import all the data of your current site into it. You can do this using phpMyAdmin.
- Configure your wp-config.php file for the adaptation to the new environment.
- Change the site URL to isolate your cloned site from the original one.
To be frank, the method of manual cloning is not easy for the majority of WordPress users. Therefore, we highly recommend you to think about the second way – make use of WordPress plugin.
Clone using WordPress Plugin
Among all the related plugins available, here, we’d like to take BackupBuddy as an example. This is a powerful plugin that can copy and duplicate your existing website with much ease.
First of all, you need to install and activate this plugin on your WordPress website. After that, you can find a BackupBuddy tab on your left-hand column. Click the Backup button under that tab.
Here, you are entering its setup wizard, from which you need to enter your email to get the backup notification and create a strong password for website restoration and migration. Besides, you can also decide where you want to send your backups and how frequently you want your site to be backed up. Then, click the Save Settings button.
Now, you need to wait for a few seconds to have your website backed up. Once the process is completed, you can either download the file or send it to an outside destination that is safe and secure.
Next, you can go back to the BackupBuddy tab and click the Restore/Migrate button. Here you can get an easy tool for website cloning.
Firstly, you should download the importbuddy.php file and your latest backup file from the “Additional Restore Option” part. Note that the file is in the ZIP format. After that, you should upload these two files to a new location, such as your local server or a folder of your current website.
Here, you have to make sure that the folder is a completely empty one without any other files and sub-folders. Besides, if you are going to move the files to your local server, they must be pasted into a sub-folder of your main htdocs folder.
Now, you can open your browser and enter the URL of http://www.domainname.com/ importbuddy.php into it. Here, you will be presented with an authentication page that requires you enter the password you have created previously.
As the Importbuddy tool can target your backup file automatically via your password, you simply need to click the Next Step button on the following webpage. Now, you need to wait a while for this tool to extract your backup ZIP file.
Next, you are in the step three for the settings of URL and database. This tool will present you with a proper URL so you do not need to worry about the WordPress address, unless you have some special requirements. As for the database information, you have to firstly create a new database using phpMyAdmin. Then, enter the required database name, password, prefix and others.
Once finishing, click the Test Database Settings button. If everything is fine, you can get the following screenshot and simply need to click the Next Step button.
The rest steps are about database importing and migration. You do not need to make any changes but only click the Next Step button for continue. The Importbuddy tool simply does everything for you automatically.
Upon the completion of the last step, you can visit the URL of your cloned site that is showed as following. Then, you need to check this site to figure out whether it is performing well on both the front-end and back-end interface.