I had a WordPress site I used to manage that I wanted to archive and host statically. I tried multiple WordPress plugins to accomplish this job, including Simply Static and WP2Static. Neither of which worked very well: Simply Static hadn’t been tested with the latest WordPress version and didn’t correctly scrape all the files. WP2Static took too long to analyze and scrape my site.
There’s a much simpler way to accomplish this goal using wget. Here’s how:
- Install wget on your computer
- Make a directory you’d like to hold your wget output (I like to make sure I have container directory, because if you accidentally pass the wrong arguments to wget, you’ll end up downloading a LOT of website information, and that can get messy).
wget --page-requisites --convert-links --adjust-extension --mirror --span-hosts --domains=your-wordpress-website.com your-wordpress-website.com
- Check the output works with a local webserver:
python -m SimpleHTTPServer 8000
- Upload your output to a static site host such as GitHub Pages, Netlify, or Amazon S3.