Easiest way to migrate domains from current droplet to new droplet

Before I mess anything up I wanted to know the easiest way to migrate existing domains and web sites to a new droplet. The current sites are static html hosted on a DO droplet and I would like to move them to a new droplet. I’m using Server Pilot as my control panel. Thanks!


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

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.

With static sites it should be pretty easy.

1.) Download a copy of your site(s) if you do not have a local copy. 2.) Create a new droplet and configure apache or nginx (it may be possible to copy the configuration from /etc/apache2/sites-enabled or /etc/nginx/sites-enabled from the old server to the new) 3.) restart your web server (either service apache2 restart or service nginx restart) 4.) upload your files. 5.) You can now set up a hosts file entry locally to test your sites with their names before pointing your public DNS. On Windows this can be done in C:\Windows\system32\drivers\etc\hosts and on Mac or Linux it’s in /etc/hosts. Create a new entry for each domain to test with your new droplet’s IP address. This will override what comes from the DNS servers. 6.) Once everything works as expected, delete your host file entries and change the IP address in the A records on your DNS zone to point to the new droplet’s IP address.

When done your sites will be served from the new server and you should not see any down-time. Let me know if I can provide more clarification on any of these steps.