How to transfer WP website, created with serverpilot, to a smaller droplet

Previously, I needed a server for two websites, so I bought a larger droplet. I created both Wordpress sites using Serverpilot. Now I only need one website and I don’t want to pay for a larger droplet. I have already deleted one of the sites, but now I’m not sure what is the best way to transfer the other. I still want to use Serverpilot afterwards.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Since you want to be able to manage your sites via serverpilot after the migration this will be slightly more complicated but still pretty straightforward.

You will first need to create your new smaller droplet and set it up in serverpilot installing an instance of WordPress.

Now you have two servers running WordPress. #1 is your old larger server which is currently hosting your site. #2 is your new smaller server which is showing a generic WordPress installation.

Now export your database using mysqldump on your old server. This will result in a .sql file. Download this and hold onto it.

Next, create an archive (using zip or tar) of your entire web root directory and download it as well.

Upload these files to your new server. On your new server.

connect to your mysql service and create a new database

create database newsite;

then exit the MySQL command line and run the following using your sql file.

mysql -uroot -p newsite < database.sql

Next, extract the archive you created of your web root so it replaces the current WordPress installation.

Edit the file wp-config.php so that the database name and username/password match your new server.

Ensure all web files are owned by the user the web service runs as:

chown -Rf www-data:www-data /var/www/html

where /var/www/html is the web root.

You should now have a working copy of your site on the new, smaller server.