• Home
  • SEM
    • PPC
    • SEO
    • How To
  • Bangladesh
  • School
    • HTTP
    • REP
    • Bots n’ htaccess
    • Source Code
    • Excel 2010
    • HTML XHTML Entities
    • Gmail Operators
    • HTML & ASCII
  • About
    • Privy
    • About This Blog
  • Contact
  • বাংলা

Saidul Hassan

Digital Marketing Evangelist

Home / Bangladesh / Download an Entire Website for Offline Viewing

Download an Entire Website for Offline Viewing

30 Mar, 2020 By Saidul Hassan · Filed Under: Bangladesh

$ wget      --recursive      --no-clobber      --page-requisites      --html-extension      --convert-links      --restrict-file-names=windows      --domains YourDomain.com      --no-parent          https://www.YourDomain.com/

Both --no-clobber and --convert-links were specified, only --convert-links will be used.

Explanation of the options:

wget \
      --recursive \
      --no-clobber \
      --page-requisites \
      --html-extension \
      --convert-links \
      --restrict-file-names=windows \
      --domains YourDomain.com \
      --no-parent \
          https://www.YourDomain.com/

--recursive: download the entire Web site.

--domains YourDomain.com: don’t follow links outside YourDomain.com.

--no-parent: don’t follow links outside the directory /.

--page-requisites: get all the elements that compose the page (images, CSS and so on).

--html-extension: save files with the .html extension.

--convert-links: convert links so that they work locally, off-line.

--restrict-file-names=windows: modify filenames so that they will work in Windows as well.

--no-clobber: don’t overwrite any existing files (used in case the download is interrupted and resumed).


This is a shorter version with slightly different settings:

wget -P /path/to/download -E -k -m -nH -np -p -c https://example.com

Explanation:
-P Set save directory path.
-E This option will cause the suitable suffix to be appended to the local filename.
-k After the download is complete, convert the links in the document to make them suitable for local viewing.
-m Turn on options suitable for mirroring.
-nH Disable generation of host-prefixed directories.
-np Do not ever ascend to the parent directory when retrieving recursively.
-p This option causes Wget to download all the files that are necessary to properly display a given HTML page.
-c Continue getting a partially-downloaded file.

The following two tabs change content below.
  • Bio
  • Latest Posts
My Twitter profileMy Facebook profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Saidul Hassan

Managing Partner at Up Arrow Consulting
COO at Up Arrow Consulting, MCC manager, & Technical SEO consultant. Certified Google Partners and Microsoft Bing Ads Accredited Professional, Python enthusiast, wannabe SysAdmin. Graduated from School of Management & Business Administration (SOMBA), Khulna University.
My Twitter profileMy Facebook profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Latest posts by Saidul Hassan (see all)

  • Batch script to create directories & moving fixed number of files to those directories - 30 Apr, 2021
  • How to use PrismJS syntax highlighter on WordPress without plugin - 30 Mar, 2020
  • Download an Entire Website for Offline Viewing - 26 Nov, 2019

Share:

  • Twitter
  • Facebook
  • LinkedIn
  • Pinterest
  • Pocket
  • Email
  • Print

First published on 26 Nov, 2019 · Last updated 30 Mar, 2020 · Tagged With: command-line, wget

Batch script to create directories & moving fixed number of files to those directories

30 Apr, 2021 By Saidul Hassan

How to use PrismJS syntax highlighter on WordPress without plugin

30 Mar, 2020 By Saidul Hassan

Download an Entire Website for Offline Viewing

26 Nov, 2019 By Saidul Hassan

How to color highlight .htaccess files in Xed/Gedit

20 Aug, 2018 By Saidul Hassan

HMA Pro VPN Setup for Multiple Locations without User/Password Every time in Linux CLI

14 May, 2018 By Saidul Hassan

  • ♥ Bangladesh ♥
    Log in · Privacy Policy · Contact
    Copyright © 2011 Saidul Hassan

  • DMCA