Some time back, I set up my wordpress server on an Ubuntu 19.10 droplet. Since support for 19.10 has been dropped, I need to migrate my installation to a new VPS. I have created a new droplet, installed wordpress on it, and backed up the database on the old VPS.
My challenges are as follows:
I am very new to all this, and had set up my wordpress website a long time back. I am however limited now as I cannot improve the functionality of my website without upgrading my server.
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 @ak331,
Okay, so let’s start with your First problem, connecting between two Droplets. What you can do in this situation is generate an SSH key on the droplet you are migrating FROM and add the SSH key to the droplet you are migrating TO.
So, to do that, go to your old Droplet, the Ubuntu 19.10, SSH to it and type in:
ssh-keygen -t ed25519
Hit enter on all asked questions. Once you do, you’ll have an SSH key generated in the home directory of your user, if you executed the above command using root, you’ll have an SSH key in
/root/.ssh/
Now, copy the file id_rsa.pub, it’s in the .ssh folder. You need to paste it on your New Droplet, inside /root/.ssh/authorized_hosts. If such a file doesn’t exist, create it. Once you paster the line, try to SSH you should be able to connect between the OLD and the New Droplet.
As for the second question,
After you’ve transferred the files, you can dump the database into a file from your old Droplet, rsync it to the new Droplet and import the database there.
When you are ready with migrating the files, type the following on your Old droplet to dump the database:
mysqldump NameOfDatabase > nameofdatabase.sql
This will dump the information of your database to the .SQL file. Now Rsync the file to the new Droplet. Once you do, you’ll need to import the .SQL file to a database you’ve created on the New Droplet. Before importing the database, create a database user which has privileges for the newly created database on your new Droplet.
Once you have this information, import the database like so:
mysql NameOfDatabase < nameofdatabase.sql
and that’s it.
Hope this helps a bit.
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.