download an entire website recursively

So you’re putting up a new website, but you just can’t imagine life without the one you have. You think maybe you want them both, but you know the old one sucks, so you just want to stick it in the back of the internet somehow…

How can you download the entire site, recursively, and still show it on another website? You could do SFTP, but then you’d have go go in and edit code like mad to add /oldsite into all the links. ick.

What do you do? Well, you can SFTP it down, but do you really want all that hidden crap to come with it?

The easiest way is just to run the wget program, like so.

Say your web server document root is /var/www

cd /var/www
mkdir v1
cd v1
wget -nH  -r http://www.oldsite.com

Presto, now you can go to http://www.mysite.com/v1 and see your old site.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.