After Abraracourcix the Iceland blog was next to move places.
The weblog is a Wordpress installation and thus the content is dynamically generated by PHP, using data in a MySQL database. This dynamic behavior is unnecessary for a weblog that has been closed and I therefore ventured on a plan to download the full website and make it available as a rather large set of plain static HTML files.
The first step you’d like to take when doing this is checking that the directory structure of the pages is to your liking. A standard Wordpress installation leaves a pretty clean structure: directories for each year, one for categories. If you have pages, they will show up with directories of their own.
These directories don’t actually exist on the server but are constructed by URL rewriting on the side of Wordpress. Very nice.
Now you take
wget and run it once over your entire site, for me it was
wget -nv -r http://ijsland.luijten.org/. If you now look inside the HTML files, you’ll notice lots of absolute hypertext references back to your own site. This is because of the options ‘home’ and ‘siteurl’ in Wordpress you’ll want to change. I changed them both to ‘/’.
Next I went into the theme files (make a backup of them) and removed all forms, like search and comment forms. I also removed any reference to RSS feeds and other scripts from the header. You may also want to remove eventual Feedburner references for tracking visitors.
The site is now ready for one last sweep with wget.
If you find that some images of the layout aren’t loaded correctly, it might be that they are referenced from the CSS file and not directly from any HTML files. You’ll have to open the CSS file and download these images yourself.
Don’t forget to make a backup of the database, you might want to reopen the weblog somewhere in the future!
So, next time you’re at http://ijsland.luijten.org/, you’re being served static HTML files by lighttpd.