Download the entire website by using wget2

wget is a built-in tool that can download the entire website on Linux. The downloaded HTML project can be hosted as a static website. However, you might have discovered that the built-in wget command didn’t download some files from the website, such as images, even though the URLs for those files were included in your downloaded HTML files.

Suggestion

The article suggests readers use the new version of wget built-in command, wget2, to download the website. Based on my experience, wget2 is more reliable than wget.

Steps to install wget2

Copy and paste the following commands in Linux terminal

Shell (Linux)
sudo apt update
sudo apt install wget2

Download the entire website

Copy and edit the following command. Paste the command in Linux terminal

wget2 -k -r [website url]

Replace [website url] with the actual website’s URL.
For example,
wget2 -k -r https://www.yourwebsite.com