Report this

What is the reason for this report?

How can I move in to DO a wordpress from an other VPS

Posted on May 28, 2015

Hi there, Im wondering how can I move in a wordpress website which is running at the moment at an other VPS in to DO ? Anyone who has done this and can share a short (or long) tutorial/guide?



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.

The following procedure should do the trick for you.

1.) Create a zip or tarball of your public web directory on your current VPS. 2.) Use mysqldump to create a backup of your wordpress database

mysqldump -uusername -p dbname > mydb.sql

3.) Create a new droplet using the LAMP image, this will be easier to use when importing a new site since we won’t have to delete an existing database or overwrite files. 4.) Get your new MySQL root password from the MOTD displayed when you log into your new droplet via ssh. 5.) Use scp or SFTP to transfer your web directory files to your droplet and extract them to /var/www/html 6.) Use the mysql command line tool to create a new database and then import your database backup.

mysql -uroot -p
create database wordpress;
mysql -uroot -p wordpress < mydb.sql

7.) Check your wp-config.php in your web root and update the database details to match those for your new droplet.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.