Skip to content

Instantly share code, notes, and snippets.

@cjohnson496
Forked from crittermike/wget.sh
Created January 2, 2019 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjohnson496/23aaffef850660e6a51d11a69459ae78 to your computer and use it in GitHub Desktop.
Save cjohnson496/23aaffef850660e6a51d11a69459ae78 to your computer and use it in GitHub Desktop.
Download an entire website with wget, along with assets.
wget \
--recursive \ # Download the whole site.
--no-clobber \ # Don't overwrite existing files.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
--restrict-file-names=windows \ # Modify filenames to work in Windows as well.
--domains yoursite.com \ # Do not follow links outside this domain.
--no-parent \ # Don't follow links outside the directory you pass in.
yoursite.com/whatever/path # The URL to download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment