Hi All,
I am looking for some advice around the best way to achieve the following, essentially i currently run 3 wordpress websites all hosted on 3 different shared hosting accounts. Lets call them r2d2.com, C3P0.com & BB8.com i want to consolidate these down and move over to a VPS on DO. I do however need to minimise any downtime and would like to take the opportunity of the move to do some testing on new features in advance. This is my plan so far"
Hopefully the above makes sense, i have three questions though.
Thanks in advance for the help.
W
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.
Great decision on moving to DigitalOcean. I moved my personal workloads to here some years ago and have loved the platform while using it in various capacities.
What you are trying to achieve is quite possible and not without the possibility of achieving it through various methods.
One approach I would take is as follows for a single droplet setup using the DigitalOcean DNS + Firewalls etc…: - Note: No admin panel outside DigitalOcean is used
Create a droplet that suited the task. Could start with the $5 1GB/1CPU/25GB - The droplet size can later be increased as required. Note: The droplet does need to be powered off when scaling and will result in an outage for the website(s) https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet
Assign the droplet a Floating IP https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean
Add the domains for the 3 sites to DigitalOcean DNS and add the appropriate entries for each domain. I at this point as a subdomain of
dev.*
to each domain - i.e.dev.c3po.com
that points to the Floating IP https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitaloceanFor revers DNS/PTR Records if required https://serverpilot.io/community/articles/how-to-set-ptr-records-and-reverse-dns.html
Setup Firewall policy and add the droplet https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-cloud-firewalls
Create a linux user account for each site and setup the home directory as desired.
Setup the LEMP stack https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04
Configure PHP Pool for each account https://www.digitalocean.com/community/tutorials/how-to-host-multiple-websites-securely-with-nginx-and-php-fpm-on-ubuntu-14-04 Note: this is for Ubuntu:14.04 however the process is the same for Ubuntu:16.04
Clone the first first site into the respective user account and web root
Add NGINX entry
Add an entry to the DNS zone file for
dev.*
-dev.c3po.com
to your registrar or previous hosting zone file that points to the Droplets Floating IP - Test everything out to ensure it is working as expected. Removedev.*
entry from the DigitalOcean DNS and NGINX Config once complete.Update your domain(s) to DigitalOceans nameservers
ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com
Secure the LEMP stack with LetsEncrypt once domain propagation is complete https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
Rinse and repeat for each domain as required. As stated before this is one possible way. Depending on the application you are running some details may need to be adjusted accordingly.
Another approach - https://blog.ssdnodes.com/blog/tutorial-using-docker-and-nginx-to-host-multiple-websites/
Setting up Vanity Name Servers - https://www.digitalocean.com/community/tutorials/how-to-create-vanity-or-branded-nameservers-with-digitalocean-cloud-servers
To avoid downtime you could design an infrastructure that spans multiple droplets with redundancy systems built in - https://www.digitalocean.com/community/tags/high-availability?type=tutorials