Copy WordPress to the Server Using Wget

back to tech articles
Wget

This quick article will be elementary to most SysAdmins, but really useful for newcomers.

Whenever you want to install the latest software to your server, do you find that you download the archive to your local machine, only to then copy it to the server, move to the correct directory, unzip, install, etc?

Today, I’ll show you how to bypass a lot of the effort using the amazing tool, wget.

I’ve logged into the server using SSH and navigated to the directory I want. Now I can copy my archive right into the directory I’m at. The command is so easy it’s mind-blowing:

1
$ wget http://wordpress.org/latest.tar.gz

Hit return and the magic happens:

1
2
3
4
5
6
7
8
9
10
-2013-08-29 10:23:56--  http://wordpress.org/latest.tar.gz
Resolving wordpress.org... 66.155.40.249, 66.155.40.250
Connecting to wordpress.org|66.155.40.249|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4028740 (3.8M) [application/x-gzip]
Saving to: “latest.tar.gz”

100%[===================================>] 4,028,740    2990K/s   in 1.2s    

2013-08-29 10:24:01 (2758 KB/s) - “latest.tar.gz” saved [4028740/4028740]

And you have the latest.tar.gz archive right there in your directory. I’ve just used WordPress as an example, but you can do this for anything! Off you go.

Leave a Reply

Your email address will not be published. Required fields are marked *