By careWalrus
Please also let us know which hosting panel services our website (for example, cPanel or similar)? Or how we could find this info.
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!
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 :
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.