How to Transfer Files Between Remote Systems?

This article will assist you to transfer web content between two remote Linux machines.

cPanel to cPanel migration

cPanel provides you with the transfer tool to move your websites from other remote hosts. If both of your machines have cPanel installed, you can easily transfer the files between them. Refer to our knowledgebase article on how to migrate your website using cPanel's copy an account option.

If your existing cPanel accounts are hosted under shared hosting, your current web host may not allow cPanel to cPanel migration. In such cases, you can take backup of cPanel accounts and move backups through FTP. You may find this article helpful to transfer cPanel accounts manually.


Manual migration using SFTP

SFTP (SSH File Transfer Protocol or Secure File Transfer Protocol) offers secure connection to transfer files between Linux machines. SFTP is highly preferable over FTP because SFTP uses the SSH protocol to authenticate and establish a secure connection.

  • Connect to VPS using SFTP

    If you could connect to your VPS through SSH, then you have all necessary requirements to use SFTP. Connect to your VPS through sFTP via the following command.

    sftp [email protected]_address_of_vps

    You will be prompted for the password, specify your SSH password and you will get connected to the remote system. This will also change shell prompt to SFTP. After connecting to your remote machine via SFTP, you can navigate to the remote machine file system using cd command.

    cd dir_name

    To know the current working directory pwd command is used. To view contents of the current directory ls command is used.

    phpinfo.php     info.html        Directory1      Directory2

    When you want to traverse the local file system, you can direct commands towards the local file system by just adding "l" before any command. For example; you can print the local working directory by command lpwd.

    Local working directory: /home/user/Desktop

    Similarly, we can list the contents of the current directory on the local machine using lls command and change the directory using lcd command.

  • Upload/Transfer local files to VPS

    You can upload/transfer local files to VPS using put command.

    put file_name
    Uploading file_name to /home/user/directory/file_name

    To copy an entire local directory to VPS, you can issue following command.

    put -r local_dir_name

  • Download VPS files to local computer

    Sometimes, you are required to download VPS files to local computer. It can be accomplished by issuing the following command.

    get file_name
    Fetching /home/user/Desktop/file_name to file_name

    If you want to copy whole directory along with its contents, issue following command.

    get -r remote_dir_name

Related Articles

Fix :: Joomla Error : Joomla php index page was rendering as text

Problem Statement Joomla website stopped working Error Message Joomla php index page was...

How many IP addresses do you offer with Shared Hosting Account and a VPS Account?

We do not offer any dedicated IP address with shared hosting plans. If you purchase SSL...

How to change storage engine of a MySQL database table?

Following article describes the steps to change storage engine of a MySQL database table. Assume...

Parse ASP pages as normal Text/HTML in cPanel server using MIME type

Problem statement One of our customers had some old .ASP file names on his website. The web...

What is the procedure to transfer my web hosting from other web hosting provider to

Following article will assist you to transfer your websites to AccuWebHosting server. According...

  • 0 Users Found This Useful

Was this answer helpful?