How to Clone a Website with Softaculous
Knowledgebase Article
}
Knowledgebase Article
Cloning your website can be used to make a copy of your website to a new domain name or folder.
For instance, you could clone a website from a subdomain to a the main domain, e.g. https://testwebsite.example.com to https://www.example.com.
From one domain to a completely different domain, e.g. https://www.example.com to https://www.example2.co.uk.
Or, you could clone a website from the top level of a domain name to a subfolder - https://www.example.com to https://www.example.com/subfolder.
Cloning a website will make a copy of the files, database, and update the application configuration file to reflect the new details.
You will end up with a second copy of the application within Softaculous, and you may then keep both copies, or remove any you no longer need.
In this article, we will be cloning an example of a WordPress installation.
We will clone the installation from https://www.example.com to a subdomain https://clone.example.com.
We will additionally consider a few cloning pre-requisites that you may need to be aware of, in this case, including creating the sub-domain we will be cloning into, making sure it has an SSL certificate installed, and how to make Softaculous aware of any custom files or folders that should be considered part of the application (and cloned along with it).
Prior to starting a site clone in Softaculous, there are a few pre-requisites. If you are cloning to a sub-domain or different domain (addon domain), you may need to have created this subdomain or addon domain in cPanel.
If your website uses https://, you may also need to have ensured SSL is set up on the new subdomain or domain.
If you are cloining to a sub-folder of the same domain (i.e. https://www.example.com/subfolder) then you will not need to do this as the cloning tool will set up the sub-folder for you, and if you have SSL already set up on that domain, then it will not need to be set up again.
Aside from setting up the domain details, you may also need to make sure that the existing installation is already imported into Softaculous (we have a separate guide on this here) and that there are no additional files or folders that may be required by that software.
For instance, sometimes a plugin may install a file that sits outside of the default plugin folder, resising instead in the root folder of the application. Although this is not common, it can be the case for some security plugins, and your web developers may also have created files or folders that Softaculous may not be aware are a part of the application and needed for it to run.
So, to check this, first let's log into cPanel and click the Softaculous icon.
Next, click to view the list of applications you have installed by clicking the Box icon (All Installations) located at the top right of the screen.
You will see a list of applications installed. If you don't see the application you were hoping to clone, you may still need to Import it into Softaculous.
If you have located the application you wanted to clone, click the Pencil icon (Edit Details) next to it.
You will come to a screen with a large number of configurable options for this installation. What we are looking to do is to make sure that every file and folder we need is included.
Click the + icon near the words: Select additional files/folders from the following list.
This will reveal a list of files and folders that are present in the application folder, but which Softaculous does not currently consider part of the application. There may not be too many as most of the files and sub-folders will already be included.
However, if you know that some of these files or folders you do see there are required by your WordPress installation, you can check them and Softaculous will now include these files and folders whenever the application is cloned or staged.
In the above example, we have a dummy custom file we have named mycustomfile.php and we have checked this file for inclusion.
To save this, scroll down and click Save Application Details. Please note that if you are within the main public_html of your website, you won't need to include some of the default folders like cgi-bin.
That's it, Softaculous is now aware of any custom files and folders and we can proceed to clone the installation.
Return to the list of applications by clicking the Box icon (All Installations) located at the top right of the screen.
Press the Clone icon:
On the next screen, you will be able to choose where you want to clone the site to. Remember, if you want to clone to a new addon domain or a sub-domain, you will need to have created this first in cPanel.
In this example, we are cloning the installation to the subdomain https://clone.example.com.
We have selected the protocol https:// so that the site is configured to use SSL. If you are cloning to something other than a subdomain, you may wish to opt for the protocol https://www. as commonly domain names are prefixed by www.
In the above example, you will see that Softaculous is showing a warning that a trusted SSL Certificate was not found.
This means that there is currently no SSL certificate installed on this subdomain.
You may see this if you have only recently created the subdomain, as cPanel may not yet have had a chance to set up an SSL certificate on it automatically.
If you don't want to wait for that to happen automatically (which can take up to 24 hours), you can instantly set up a free SSL certificate using cPanel's AutoSSL or Let's Encrypt, and then return to this page to complete the clone.
An SSL can only be issued if the domain name is registered and pointing at the server, so if you are attempting to clone to a domain that is not yet registered, or pointed to the server, you will need to do this first before you can issue an SSL certificate to it.
In the above example, we are leaving In Directory blank as we do not want this to appear in a sub-folder of this subdomain, we simply want it to exist on the subdomain itself.
You may wish to fill this in if you wanted to copy the application to a sub-folder of the same domain, i.e. clone https://www.example.com to https://www.example.com/clone.
You can optionally specify a database name, though this is automatically completed for you. Set this only if you want to have a name that makes sense to you so you know which database is in use on this cloned website.
You can additionally prevent the site from being search engine indexed, and you can give the cloned site a different name.
Once you're happy with your clone settings, click the Clone Installation button and Softaculous will start cloning the installation.
The time taken may vary in accordance to size of your installation, and may take a few minutes to complete.
That’s it!!
You can now use this cloned installation to test the updates or any other changes you may want to test. The admin/user account login details will be the same as the source installation.
Powered by WHMCompleteSolution