[wp-hackers] Importing HTML files as pages -- been done?
harish.mlists at gmail.com
Sat Feb 7 08:18:51 GMT 2009
> I have the opposite problem and can't find a solution. I need to convert
> a WP site to static HTML pages. In case anyone is wondering why, it's a
> local govt site for a now defunct organisation that will never be
> updated again but has to be kept alive for three years (legal/archive
> reasons). Removing WP would reduce maintenance to almost zero. I could
> sit and manually save and clean up 600+ pages but it would take longer
> than the current maintenance time. No amount of searching has so far
> come up with a usable solution but if anyone knows of a way I'd be
> eternally (well, three years) grateful.
Here's a sequence of steps that works for me, but for an entirely
1. Install wp-super-cache.
2. Write a script to make sure all your pages are crawled. This ensures
that wp-super-cache at least generates all pages once and stores them
In order to do this, I've:
a. Installed the XML sitemap generator plugin.
b. Fetch its output, say listing.xml, and create a bash script to
pull all the files:
grep '<loc>' listing.xml | sed 's/<loc>/ wget --delete-after /' |
sed 's/<\/loc>//' > listing.sh
c. Run this script using 'bash ./listing.sh'
3. Save the cache folder created on your server.
This preserves your website exactly the way it is, including link
 I use it to make WordPress behave like an engine that generates
static HTML on inexpensive servers where the MySQL connection is
sometimes overloaded and hence slow/flaky.
More information about the wp-hackers