Start a profitable website or blog

Free email course
by the MarbleHost Academy.

1,000s of MarbleHost clients make money this way
100s of proven strategies
100s of income ideas

How to Transfer Your Website to a New Web Host Using SSH

Transferring your website to a new web host can be a daunting task, but using SSH can make it easier. SSH (Secure Shell) is a network protocol that allows you to securely access a remote computer. In this article, we will guide you on how to transfer your website to a new web host using SSH.

Step 1: Backup Your Website

The first step is to backup your website. This is important in case anything goes wrong during the transfer process. To do this, connect to your current web host using SSH and navigate to the root directory of your website. Then, use the following command to create a compressed archive of your website:

tar -czvf backup.tar.gz /path/to/your/website

Replace /path/to/your/website with the actual path to your website on your web host.

Step 2: Download the Backup File

Once the backup is complete, download the backup file to your local computer using the following command:

scp username@yourwebsite.com:/path/to/backup.tar.gz /path/to/save/backup.tar.gz

Replace username with your SSH username, yourwebsite.com with your website's domain name or IP address, /path/to/backup.tar.gz with the actual path to the backup file on your web host, and /path/to/save/backup.tar.gz with the path to where you want to save the backup file on your local computer.

Step 3: Upload the Backup File to the New Web Host

Upload the backup file to the root directory of your new web host using the following command:

scp /path/to/backup.tar.gz username@yournewwebsite.com:/path/to/your/new/web/root/directory

Replace /path/to/backup.tar.gz with the path to the backup file on your local computer, username with your SSH username for the new web host, yournewwebsite.com with your new web host's domain name or IP address, and /path/to/your/new/web/root/directory with the actual path to the root directory of your website on the new web host.

Step 4: Extract the Backup File

Connect to your new web host using SSH and navigate to the root directory of your website. Then, use the following command to extract the backup file:

tar -xzvf backup.tar.gz

Step 5: Update Your Website Configuration

Finally, update your website configuration to reflect any changes in the new web host environment. This may include updating your database credentials or changing the domain name in your website's configuration files.

That's it! You have successfully transferred your website to a new web host using SSH.

Join MarbleHost Academy

Discover how to create a profitable website or a blog.
Join our free email course and start making money right now.

About the author

Guest author Guest author
This blog post has been written by a guest author.
MarbleHost has been providing reliable web hosting services SINCE 2005.