I have on older droplet with Ubuntu 14 and WordPress 4.8. I just created a new WordPress droplet with the MarketPlace 1-Click Setup. Its a Ubuntu 20.04 and WordPress 5.8 droplet. During WP configuration script I used the same domain name information as my old site etc.
So now I need to know the best way to move the MySQL database and then the wp-content directory. Also, I am probably missing some steps.
Both droplets are in the SFO facility.
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!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
At the moment you’ve created two different WordPress installations, one updated to 5.8 and one to 4.8. This means you’ll need to migrate your WordPress installation 4.8 to the new droplet and update WordPress there.
Another solution I can give you is to update your WordPress and Droplet rather than using a new one. You’ve mentioned you are using Ubuntu 14.04, it’s heavily out of date so you’ll need to update it as well.
I’ll try and provide steps for both, scenarios:
Let’s start with the first option - Updating your Droplet and WordPress.
Before starting this option make sure to create a backup/snapshot as this process can be tricky and can result in some broken packages:
Now, once you do have a backup or a snapshot, SSH to your droplet and type in:
This will initiate the upgrade process, once it finishes you’ll have Ubuntu 18.04. You’ll need to reboot your Droplet and run the same 3 commands again to upgrade to 20.04.
Once this is finished you’ll just need to enter into your WordPress and upgrade it from the admin area
Next method - Migrating your WordPress to your new droplet.
Now, this one, you’ve already created a droplet with your new WordPress on it. What you can do is, dump your database from your old droplet and migrate it with your wp-content folder to your new droplet.
SSH to your droplet and go to the folder where your WordPress installation is located:
In there grep for your MySQL’s credentials:
Once you have them, you need to dump the database there:
This will dump the information from your database to a file. Now that you have this file, you can transfer it alongside the wp-content folder to your new droplet. You can use FTP for that or use SSH and rsync or scp, it’s up to you.
In case you want to use FTP, give the following docs a read:
Now, once you’ve transferred the data over, you’ll need to create a mysql database and username or use the one already created by your MarketPlace Droplet replace the wp-content folder with your old one and import the db over:
Hope this helps