Hello there. Am new in Digital Ocean. I need someone to copie my principal website to a new sub domain with a new database, new SFTP account.
Can you please help me?
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!
In our public community, we aim to answer open questions about anything SysAdmin, DigitalOcean, and beyond. We can give you pointers as to how to do it but if you require a service that’s usually payable I’ll recommend reaching other websites that do offer freelance work.
If you want to copy your website to an we subdomain, I can give you some pointers.
ssh root@YourDropletIP
Create the directory for your_domain as follows:
sudo mkdir /var/www/your_domain
Next, assign ownership of the directory with the $USER environment variable:
sudo chown -R $USER:$USER /var/www/your_domain
The permissions of your web roots should be correct if you haven’t modified your umask value, which sets default file permissions. To ensure that your permissions are correct and allow the owner to read, write, and execute the files while granting only read and execute permissions to groups and others, you can input the following command:
sudo chmod -R 755 /var/www/your_domain
Now to the VirtualHost
sudo nano /etc/apache2/sites-available/your_domain.conf
Paste in the following configuration block, which is similar to the default, but updated for our new directory and domain name:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName your_domain
ServerAlias www.your_domain
DocumentRoot /var/www/your_domain
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and close the file when you are finished.
Let’s enable the file with the a2ensite tool:
sudo a2ensite your_domain.conf
sudo systemctl restart apache2
Now, you need to copy over your website like so
cp -rav /path/to/website /path/to/subdomain
This will copy all folders from your main website to the subdomain you added.
To create the Database, please let me know what MySQL/MariaDB version you are using so that I can provide you with the proper steps.
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.