Converts a dynamic WordPress site to static HTML for archival purposes.
Preparing the site
The sitemap.xml file will contain a full list of URLs for the site except for paginated date/category/tag archive pages. The Wordpress theme will probably need to be modified to list all links to posts in a date/category/tag archive on one page (an example child theme I used on my wife's site is in the doc folder).
Disable comments on all posts and pages with this MySQL query so the comment form won't show:
UPDATE wp_posts SET comment_status="closed";
Disable any plugins which require server-side calls from the front end (ex: AJAX polls) or which depend on external URLs (ex: Google Analytics).
Clone this repo into the WordPress root directory (in the same directory as the sitemap.xml file).
Change to the wp-mothballer directory and run the
Back up the WordPress installation, then replace all the files in your WordPress directory with the contents of the dist directory.
Everything in the WordPress folder will be included in the cached archive except for files with a .php extension. Rules in the .htaccess file will allow for keeping pretty permalinks with static HTML files.