How to clone a website

Photo by Phil Shaw on Unsplash

How to clone a website

Clone a website from the internet and get it to work with all the files needed to run it.

As a frontend software engineer, I sometimes come across websites that I want to clone. Also, a disturbing amount of people have asked me to clone websites. Usually betting ones. Anyway, for the longest time, I've manually recreated these websites. I always wondered if this was the best way to do it. I tried saving the websites with Chrome but it doesn't give you everything. Just the HTML. So I did some research and found a solution to this.

It's wget it's pretty straightforward I'm not going to waste your time. Just download wget on your terminal and run wget --mirror --convert-links --wait=2 <baseURL> and you're good. Thank you for reading be sure to like and share... If only it was that easy.

This would work for only websites with http protected endpoints for the ones with https you're out of luck. You'd have to go through some rigorous process to get it to work. At that point, you might as well look into hacking and cyber-security work.

There is an alternative though. But I worn you it is incredibly painstaking. Ready?. So go to the website using your browser - chrome, let's not pretend, and go to the Sources tab in the developer settings. You'll have to manually copy over the files one by one into a folder on your system. Yup, it's not fun.

Anyway, that's it. Enjoy this new-found knowledge. Bye.