How to use the ‘wget’ SSH command to transfer large files between servers

We typically use the cPanel File Manager to upload files into the server. Most times, the speed is good enough, but sometimes the file may be really big or there might be a problem with the connection which slows down the upload to a crawl (50kbps, anyone?).

Sometimes, a simple PHP script can fix the issue (Read: How to upload into cPanel from a 3rd party URL)

However, this doesn’t always work. Here’s where wget comes in handy.

What you need:

  1. cPanel username & password to the destination server
  2. Shell access for the destination server
    **Shared hostings usually do not provide shell access. Check with your host for this. Of course, you could also just ask your host to transfer the file for you… but then you wouldn’t need this tutorial now, would you? :P
  3. PuTTY (download here)

Steps:

1. Login to PuTTY with the cPanel username & password

First, open PuTTY. You’ll see this menu as below, just fill in the site’s URL or IP address:

This will open a black terminal screen. Type the cPanel username and hit Enter.

You’ll be prompted for the password. Copy the password as per usual Ctrl+C, then right-click into the terminal screen and press Enter. Ctrl+V doesn’t work with PuTTY, for security reasons.

2. Type the ‘wget’ command

Once you’re logged in, simply type the command below, and hit Enter:

wget (space) https://destination-url.com/filename.zip

e.g. wget https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png

That’s it! Just sit back and wait, usually the upload speed should be in the tens of MB/s.

The resultant file should be located in your root folder.

Share via
Copy link
Powered by Social Snap