How to Get Wget for Your Mac

Angela Randall 10-02-2012

wget for macMacs are great, with their neat UI and a Unix back-end. Sometimes you get the feeling you can do just about anything with them. Until one day you’re trying to do something simple and you realise what you need is just not available natively. In this case, I’m talking about wget.


In case you don’t know, wget is an incredibly useful command-line tool to download whole webpages, including media and as much link depth as you require. It’s quite powerful and sophisticated and it comes in very handy when you’re trying to make backups – especially since it can be worked into scripts. It doesn’t take a Unix guru to get hold of it and use it, either. It can be yours in a few steps, which are just fiddly enough to warrant writing out.

Get The Wget Binary

This is a cheat method which might not be around forever and may not work for everyone – but it’s quick. A very kind soul called Quentin Stafford-Fraser has made a binary of wget for Mac OS X Leopard. Download the zip file and unzip it. Copy the wget file to /usr/local/bin (and follow the README instructions for the other files also).

If this hasn’t worked for you for some reason, read on.

Get a C/C++ Compiler For Your Mac

If you don’t already have a C/C++ compiler for your Mac, you’re going to need one. The easiest way to get them is to install Xcode from the Mac Developer tools, which is available for free on your OS install disc or for Lion via the Mac App Store.

If none of these are an option, install the appropriate package according to the instructions at


Get XZ Utils For Mac

The wget package comes as a xz compressed file and it’s sad, but true, that this format isn’t supported by the MacOS Unzip utility. So, go grab a copy of XZ Utils for Mac so that you can unzip the wget package when you get it.

Get Wget Package Using HTTP or FTP

Head to the wget page and download the wget package via HTTP or FTP or a mirror site which suits you. Download the most recent version you can find.

Unzip And Install Wget

Open up the Terminal application (Applications > Utilities > Terminal) and navigate to wherever the package was downloaded.

cd ~/Downloads

Unzip the file using XZ Utils and tar (replace the name of the file with whichever wget version you have downloaded):

xz -d wget-1.13.tar.xz
tar -xf wget-1.13.tar

Change into the new wget directory and run these commands in order:

cd wget-1.13
sudo make install

wget for mac

Some Ideas For Using Wget

Wget can be used in any instance where you might use DownThemAll to get pictures, music or video in bulk from a website. It can also be used to backup entire websites and perhaps mirror them for preservation.

wget for mac


If you’re still not sure what you might use Wget for, consider using Wget to back up your online photo directories or to grab MP3s from open folders online. Anywhere you know of where there’s a folder full of media or a page which links to or displays media can be downloaded with one command using Wget. Although it’s therefore possible to use Wget for entertainment you probably should have paid for, there are plenty of honourable uses for it.

For instance, if you work for a small company who are not so great with their backups, maybe you could use Wget in a script in order to back up your company website. When the inevitable day comes and the work server crashes, you’ll save the day by being able to pull up a recent backup. The same goes for your favourite community websites or anything run by amateurs: your kid’s footy club, the local drama group or whatever else you’re involved with.

Wget is especially good if everyone’s forgotten the password or if hackers changed your website password. Wget can grab all the important stuff for you and you can start fresh.

Using Wget

Here’s a quick example of a Wget command for creating a mirror all of the HTML and media from a page.

wget -m //

It’s simple and effective, although I honestly don’t recommend trying this particular example at home!

Cool Scripts And Downloaders

If you’re into automation and downloading, here’s some more to read:

What do you use wget for? Let us know!

Image Credit: Download icon blue glass via Shutterstock, Man in wheat field joying via Shutterstock

Related topics: Computer Automation, Data Backup, Download Management.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. macharia
    January 30, 2015 at 1:04 am

    how can I download Xcode for mac os x lion 10.7.5 for free so as to compile c programs

  2. ilyse kazar
    August 4, 2012 at 12:30 pm

    further warning: the linked-to page for XZ utilities has all kinds of intimidating instructions for "making" the utility on your mac. There is also a link (on the XZ utilities page) to an installable package made by someone. I downloaded that .dmg and ran the installer, but when I double-click on the wget-1.13.tar.xz file and it asks me to choose what application to decompress it, there is no "XZ" available in either my Applications or my Utilities folder (and, yes, I chose my HD for the installation).

    While I appreciate the intent of helping people install wget onto their macs, I would suggest that next time the author have a "beta tester" read and try to follow the instructions in the article. Rather than saving me any time, multiple attempts to follow the various links and installations just wasted an hour of my life.

  3. ilyse kazar
    August 4, 2012 at 12:16 pm

    Warning: the wget binary instructions do not seem to apply at all to Snow Leopard. For example, the instructions say to install a component into /usr/local/man/man1 but the man's on Snow Leopard are at /usr/share/man/man1. Also, on my Macbook 10.6.8 there is no usr/local/etc directory the instructions refer to, only /etc

    I did my best with this script but it failed on Snow Leopard. This is not for anyone except those completely knowledgeable about the various directories inside Terminal. Not recommended even for everyday "power users" like me.

  4. Svend Bakken
    June 6, 2012 at 5:17 pm

    I was myself looking for wget for mac a while back, and stumbled upon this webpage:
    [Broken Link Removed]
    It has a link to the newest version of wget, and I found that the executable worked on both Snow Leopard and Lion.

    • Angela Alcorn
      June 10, 2012 at 3:59 pm

      Thanks, that looks useful!

  5. Paul
    May 28, 2012 at 10:10 pm

    When someone makes an effort to explain how to repair a leaking sunroof on a Toyota Landcruiser, why do people feel the urge to write responses like:

    * "you should get a car with airconditioning",
    * "why don't you drive a Mercedes, like ALL of us (in Stuttgart)",
    * "cars are bad",
    * "why not just take it to a mechanic",
    * "your Toyota is stupid".

    I like my Toyota, thank you.

    Oh, and does anybody even remember why Apple removed Wget from OSX? or when?

    Curl is for noobs.

  6. Aibek
    February 21, 2012 at 1:35 am

    second that

  7. Angela Alcorn
    February 15, 2012 at 6:32 am

    Homebrew's another nice idea.

  8. Anonymous
    February 10, 2012 at 10:58 pm

    I'm pretty sure cURL can do a lot of what wget can. What situation would you need wget for in which cURL just isn't enough? It's always better to use a built-in solution. Publicly shared shell scripts will depend on cURL, not wget.

    • Angela Alcorn
      February 15, 2012 at 6:35 am

      I haven't really used cURL but I guess it does many of the same things. I think that sometimes people get attached to commands they can use well/quickly and like to stick with them where possible. Maybe also to run similar scripts across several OSs?

      Who knows? I'm just helping them to get wget running if that's what they're after. :)

  9. Vaibhav Vgc
    February 10, 2012 at 10:29 pm

    i am getting this at the end in terminal : configure: error: --with-ssl was given, but GNUTLS is not available.

    • Angela Alcorn
      February 15, 2012 at 6:37 am

      This should help:

      Or, try the homebrew route to get wget:

      • Frank van Westerop
        June 15, 2012 at 8:27 am

        No, you would mess up your SSL stack. OSX Lion 10.7 for instance comes with OpenSSL which does the same but is mutual exclusive with the GnuTLS SSL lib. Just tell the configure script to use OpenSSL instead:

        ./configure --with-ssl=openssl

        full story: [Broken URL Removed]

        • Angela Alcorn
          June 15, 2012 at 2:58 pm

          Thanks for sharing this!

    • Frank van Westerop
      June 15, 2012 at 8:32 am

      Don't install GnuTLS, you would probably break your SSL stack. Most likely your box just uses some other SSL library, for instance OSX Lion 10.7 comes with OpenSSL. In general don't install more than one SSL lib or you will break things. Just tell configure to use OpenSSL instead, in case you're on Lion:

      ./configure --with-ssl=openssl

      See also: [Broken URL Removed]

  10. Gant Laborde
    February 10, 2012 at 9:31 pm

    WOW, that's a lot of effort for something that's easy using homebrew!

    • Angela Alcorn
      February 15, 2012 at 6:32 am

      Thanks for sharing the link!