Question

How to WordPress droplet to another droplet

Posted March 1, 2020 244 views
WordPress

I have WordPress droplet, and I would like to move it to another newer WordPress droplet.
I know I have to create a new droplet (going with marketplace WordPress droplet https://cloud.digitalocean.com/marketplace/5ba19759c472e4189b34e066?i=67c8ef&referrer=droplets%2Fnew), and then I can have transfer the WordPress files and database, but I’m using Let’s Encrypt SSL on the live site, so how do make sure to set up Let’s Encrypt on new droplet without affecting the live site and before changing DNS settings? Because when restoring the database everything is going to be https on the new droplet.

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.

×
1 answer

Hi there @mhweb,

What you could do is copy your Apache Virtual Host from the old Droplet to the new one along with your Let’s Encrypt SSL files.

Your Virtual Hosts should be stored at:

/etc/apache2/sites-available/your_domain.com.conf
/etc/apache2/sites-available/your_domain.com-le-ssl.conf

Copy the content of the two virtual hosts and update the content of the virtual host on the new server.

After that copy your SSL files to your new Droplet as well, they should be stored at:

/etc/letsencrypt/live/your_domain.com/fullchain.pem
/etc/letsencrypt/live/your_domain.com/privkey.pem

Once you have your SSL files and your virtual hosts in place, make sure to run an Apache config test:

apachectl -t

And if you get syntax OK restart Apache:

systemctl restart apache2

That way you would have an SSL installed on the new Droplet before changing the DNS.

Hope that this helps!
Regards,
Bobby

Submit an Answer