Question

We would like to do the website clone and move it on a subdomain

Please also let us know which hosting panel services our website (for example, cPanel or similar)? Or how we could find this info.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @careWalrus,

I’m not entirely sure I understand your question however will try to answer to the best of my abilities, please do let me know if I missed something out.

Let’s start from the beginning, do you have a Droplet with DigitalOcean or do you wish to move here. If you don’t have a Droplet, you’ll need to create one and have your website migrated either by your end or find someone to do it for you. If you have a Droplet and just want to copy the website from one folder to another and have it load from different places - domain’s, subdomains, that’s also possible.

Let’s start with creating a new Droplet. You can use cPanel for your droplet if you are familiar with it. Luckily, DigitalOcean have a OneClick App for cPanel - https://marketplace.digitalocean.com/apps/cpanel-whm . This will install cPanel for you and you’ll just need to copy/migrate the website over to it.

Let’s continue with the option where you have a Droplet and want to duplicate the website. In this case, first you need to figure out which WebService are you using Nginx or Apache. To do so, you’ll need to SSH to your droplet:

ssh root@YourDropletIp

and type in the following command

netstat -tulpen | grep 80

Based on the result you’ll see if it’s either Nginx or Apache.

Now that you know which server it is, you can follow these tutorials to see how to create a new configuration file for the new subdomain

Apache :

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04

Nginx :

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Now that you’ve configured what you need, copy the files from the main website’s folder to the one you’ve just created. You can use the cp command to do so.

Be sure to create a new MySQL and dump the database there as well.

Lastly, make sure to create a DNS record for your subdomain. Depending on where you nameservers are/where your DNS is being managed, you’ll need to add an A record for your just created subdomain.

Regards, KDSys