0

I'm having troubles moving my current website to a new host. The website is hosted on a www.website.org/wordpress and I need to move the entire website to a new server to which I have access via ssh and ftp.

The plan is the usual, backup all files and the database and then move the files to the new server, where the website will be hosted in a new address. But the tutorials that I've found use cPanel or other management tools that I don't think that I have access to.

The other method is to try and copy every file from my current webhost using ftp, but I don't know how to connect to the website and copy all files. Somehow I'm having problems downloading the files from my website to my computer to move them to the new server.

Is there a simple step that I'm missing on how to log into the website to copy the file structure from wordpress?

Thanks in advance for any responses.

kaylani2
  • 93
  • 11

1 Answers1

0

Through ssh you should try the scp command. You can read more in this explicative answer How to copy a folder from remote to local using scp?.

EDIT

In your case would be:

scp -r user@sourcewebsite.com:/path/to/wp user@destinationwebsite.com:/home/user/Desktop/

Let's check that source and destination folder paths actually exist.

middlelady
  • 573
  • 2
  • 13
  • 36
  • I've tried to connect to the server but I get "Name or service not known". I'm trying to ssh into it with the following command: ssh user@website.org/wordpress Is it possible that ssh is not supported by default? – kaylani2 Sep 29 '19 at 14:17
  • It's possible, but try to do just `ssh user@website.org` and see what happens. However you miss a `:`. See my edited answer. – middlelady Sep 29 '19 at 16:30
  • I've tried `ssh user@website.org` instead of `ssh user@website.org/wordpress` (which is my current address), but I end up on another server. This is because the address website.org is already in use. This is to where I need to move the new website. The missing `:` is only needed when using scp but not when using ssh, right? – kaylani2 Sep 29 '19 at 20:54
  • Yes right but you should probably ask your hosting provider if you are actually allowed to access and eventually the correct hostname/ip to use. – middlelady Sep 30 '19 at 08:01
  • I've contacted the provider and I'm waiting for a response. In the meanwhile I've used the Duplicator plugin suggested by another user. I can't automate it using bash but it works for a one time shot. – kaylani2 Sep 30 '19 at 13:42