how to ssh wordpress backup into a new ubuntu VM

March 7, 2015 1.2k views
WordPress Getting Started Ubuntu

Hi i am trying to send a backup file of wordpress into a fresh install of ubuntu, however i have no clue on what to do. I could not install ubuntu with wordpress as restoring the backup file cannot have wordpress already installed.

3 comments
  • I'm using backup buddy wordpress plugin to backup my files

  • 1.can you sftp into your new ubuntu install?

    1. can you ssh into your new ubuntu install?
    2. do you have phpmyadmin installed?
    3. is your old server (where Wordpress was installed previously) still running?
  • Hi Sierracircle,

    1) Yes i just tried sftp and i have shifted my backup file into the root folder
    2) Yes i am able to ssh into new ubuntu install, but what command can i use to transfer files into root instead of sftp? i tried scp root@ip/root but it didnt work
    3) do i need to manually instead phpmyadmin in the new ubuntu installed?
    4) yes the old server is still running

    Thank you.

1 Answer

Yes i am able to ssh into new ubuntu install, but what command can i use to transfer files into root instead of sftp? i tried scp root@ip/root but it didnt work

If you are using the WordPress one-click image the default web root is /var/www/html so to transfer a file to that location you would use scp my_file.zip root@ip_address:/var/www/html/. The : between the IP address and the file path is important.

do i need to manually instead phpmyadmin in the new ubuntu installed?

By default we do not include phpmyadmin on our WordPress one-click. You can import your database (assuming a .sql file) by doing the following.

If you're using the WordPress one-click there will already be a populated database. You'll need to empty it before importing your backup. Once you've done that either by dropping and re-creating the wordpress database (and updating permissions) or by dropping all the tables in the database you can use this command to import your backup:

mysql -uroot -p wordpress < backup.sql
Have another answer? Share your knowledge.