Are you in need of cloning your WordPress website?
Whether you want to move to a new hosting, create a development or staging site, or simply make a backup of your current website, cloning your WordPress site can come in handy.
In this article, we will guide you through the process of cloning your WordPress site with ease. With step-by-step instructions, you will learn how to replicate your website’s content, settings, and configurations in a matter of minutes.
So, let’s get started!
Why You Might Need to Clone Your Website?
Cloning a website is hectic. It’s not something easy. So why do you need to do so?
One reason is during the shift to a new host, or a new domain name. Cloning the website boosts the migration process, and it can also reduce some work in the process.
Another situation when you might clone a site is during the staging of a site. This allows you to test the changes before going live with the site.
Another important reason is for developing a client’s website on your local host. This helps the smooth flow of work. After completing the project, it’s easy to clone the site and transfer it to the client’s live server.
Back up your existing site
Before attempting to clone, you should back up your website fully. And we mean FULLY! You should not leave out any data or files when backing up a WordPress site. You never know when the missing part will strike and create glitches in your cloned site.
Backing up everything on your website means all files and databases. Your files could be the core files, plugin files, theme files, configuration, and settings files, and uploaded files. Your database includes your user information, posts, pages, links, comments, and any other user-generated content.
To make your work simpler and smoother, we suggest you back up the following ways:
Back up Manually:
This traditional method of backing up files and data is the least effective and most time-consuming. The lack of efficiency of this method might make you go slow and feel cumbersome. You can do something more productive instead of manually backing up your site.
But if you want to carry it out anyway, remember that you will have to back up the files and database separately. Usually, the built-in cPanel of your system supports you with manual backup. But for file backup, you might need to access the FTP of your host or a client FTP.
However, note that the least effective of manual backups comes from the fact that these are unreliable, take a lot of time to download, and cannot be tested before restoring. All these should keep you away from choosing this method unless it’s the last resort.
Backup via Web Host:
Most web hosts provide website backups if included in your package. You can check the terms of your agreement, or you can contact their support team to know the details.
Generally, this method includes a few steps. They are as follows:
- Logging into the dashboard of your hosting account
- Selecting the target site to backup
- Clicking on the backup option, which usually appears on the navigation panel
- Following the steps as instructed by the host.
This method, though, should not be your priority method. Because you will have to contact the host’s customer support team whenever you need an offsite backup. In addition, if a malicious attack sprouts from your backed-up site, your host will completely take it down or put it offline immediately.
Back up via Plugins:
The most effective and efficient way to backup a WordPress website is to use a plugin. These plugins save significant time, effort, and hassle in backing up website contents and help you schedule automatic backups and use one-click restores with maximum results. Most plugins give you unlimited storage (as per package) and offsite backups as well. Not to forget the security and dashboard most plugins provide too.
Install Duplicator Plugin
After you have backed up your website contents, it’s time to move on to the real thing: Cloning!
You can clone in two ways: either manually (again, less preferred but a tryout for DIY people) or by plugin support.
As we prefer cloning via a plugin, let’s talk step-by-step about it. To demonstrate that, we will use the Duplicator plugin for your easy understanding.
Firstly, the plugin will duplicate all your files and databases and back them up once you have completed your activation. Before duplicating and backing up, it will check your website content for issues and warn you accordingly. Once these issues are resolved (as advised by Duplicator), your duplication process continues.
After backing up existing content and building duplicated content is completed, you now need to download the duplicated website content to your computer. The contents will be saved in an archived file for secure download.
You can download the archive file with an installation file for uploading. Unarchiving the contents will be triggered via the installation file, which will then lead to uploading to a live website or a website on your local server.
Next, open the folder created for your cloned website. Copy the archive file and installer file into the folder. And make sure that folder has no other content besides those two files.
Following this, create a new WordPress database that unpacks your cloned version of your existing WordPress site; if you haven’t already.
Depending on whether your new location is live or a site in your local server, you can make a database.
One way is by simply logging into your hosting account and creating a database via MySQL Databases if the site is live. Another way is by using a localhost installation in your web browser and launching phpMyAdmin. You can do this by visiting http://localhost/phpmyadmin/ or ‘http://localhost:8080/phpmyadmin/ in the phpMyAdmin in your local web browser.
Once the website files and databases are in place, run the Duplicator installer script which opens your archive file and unpacks all content with a few clicks.
Finally, test the cloned website and see if any unwanted issues exist. Delete unnecessary files or content and also check the admin area for errors. Refer to relevant guides to solve any errors or contact web hosts like Exonhost to help you out with these.
How to clone a WordPress site manually
As mentioned earlier, manual cloning is the least preferred among all types. But in case you are the Do-It-Yourself (DIY) type of person, check out the following steps:
- Create a copy of all your website files and download them to your device or computer.
- Place your copied files on a web server.
- Copy your current site’s databases to the web server by exporting them (with the help of tools like phpMyAdmin and Adminer.
- To store its content and settings, create a database for your live site’s clone.
- With the help of a SQL file, transfer your live site’s databases to the clone’s databases.
- Modify the wp-config.php file, which includes your website’s core configuration details, according to the correct database information. This file is located in the root directory of your website.
- Store this file and re-upload it to the root directory of your cloned site.
The above steps will lead to a cloned WordPress website. But we prefer you carry out the manual process via an FTP client like FileZilla if you want to take the trouble.
Cloning a WordPress site is a bit complex and only done during special cases. It could be for migrating to a new host server. Or, it could be for a client’s project work, besides other reasons.
But, this cloning process can also take a lot of time and give a lot of mental stress, especially if you attempt to do it manually.
We suggest you save time, unnecessary stress, and needless effort, in cloning WordPress sites, if you have to. To do so, you can choose Exonhost to assist you to clone your site easily in negligible time and with minimum effort. You also reap maximum results with this minimal effort.
So, we hope this guide kicks off your 2023 tremendously. Next time you choose to create a twin of your WordPress website, do it the SMART way with Exonhost. Enjoy safe and effective cloning with the help of experts.