Downloading a website using wget (all html/css/js/etc)

By Steve Claridge on 2014-11-05.

The below wget command will download all HTML pages for a given website and all of the local assets (CSS/JS/etc) needed to correctly display the pages.

wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains example.com \
         www.example.com