Ryan Jacobs


Cloning Websites

How to Do It

$ wget -mpk http://ryanjacobs.io/

That commmand right there will clone my website locally. Now to view it, all you have to do is open ./ryanjacobs.io/index.html in your browser. Typically you can just run:

$ google-chrome ryanjacobs.io/index.html

or if you're on Firefox

$ firefox ryanjacobs.io/index.html

or if you're using some other obscure browser, just point it to the location of the file.

Another Example

This will clone the contents of example.org.

$ wget -mpk http://example.org

Options Breakdown

Option Purpose
-m, --mirror turn on options suitable for mirroring
-p download all files necessary to display page, e.g. CSS, images, etc.
-k, --convert convert links to reference the local copies, not the online versions