---
title: Download an Entire Website Using wget
description: In this post we'll look at a simple wget command to download an entire website, including all content and assets.
date: 2021-06-01
tags: wget
source: https://brianchildress.co/blog/download-entire-website-with-wget
---

# Download an Entire Website Using wget

I was recently doing some research and found a few sites that I really liked, whether it was their styling or layout or something, I was drawn in. I wanted to dive deeper into how they implemented their solution, but using the developer tools and poking around at minified files was too manual and time consuming. I wanted a way to download everything so I could use my code editor and other tools I was used to using.

### The Solution

I found this handy [article](https://linuxreviews.org/Wget:_download_whole_or_parts_of_websites_with_ease) on downloading an entire website using [wget](https://www.gnu.org/software/wget/). The final command I used looked something like this:

```sh
wget -r --reject mp3,mp4 -e robots=off https://brianchildress.co/
```

Breaking this down:

`wget`: the tool that's available for the GNU operating system

`-r`: _Recursive_, downloads all assets and resources recursively

`--reject`: Rejects all file types based on the array of file extensions provided

`-e robots=off` Respects the _robots.txt_ file and ignores any files that are off limits to the robots

`<url>` The URL of the site we want to download from

_Additional options worth considering_

`-m`: _Mirror_, enables recursion and time-stamping, maintains FTP directory listings.
`-p`: _Page-requisites_, retrieves all images, etc. needed to display HTML page.
`-k`: _Convert-links_, alters links in downloaded HTML point to local files.
