← All releases

wp-content/plugins/coldsnap/coldsnap.php

Coldsnap

Export the whole site as flat files, and find out before you deploy which pages would have broken.

== Description ==

Static export is easy until something on the site needed a server. Coldsnap crawls first and produces a report: which pages contain forms, which contain search, which contain anything that reads a cookie. You see that list before a single file is written.

The crawl follows internal links, sitemap entries and pagination, then rewrites URLs to relative paths so the output works from a subdirectory or a bucket root without configuration. Assets are copied with their query strings resolved into filenames.

It runs from WP-CLI so it can live in a deploy pipeline: wp coldsnap export --to=./build exits non-zero if the pre-flight found something you have not acknowledged.

== Screenshots ==

Numbered the way they ship in /assets/. Click any one to see it full width.

== Installation ==

  • Install and activate the plugin.
  • Run wp coldsnap check and read what it says about forms and search.
  • Run wp coldsnap export --to=./build.

The export is deterministic: the same content produces byte-identical output, so a diff between builds means something changed.

== Frequently asked questions ==

What happens to the search page?

It is exported as a page explaining that search is unavailable, unless you point Coldsnap at a client-side index instead.

Does it handle multisite?

One site per run. Loop over the network with wp site list and --url=.

== Changelog ==

= 1.8.2 =

  • Pre-flight now flags pages containing a REST-backed block, which previously exported as empty markup.

= 1.8.0 =

  • Deterministic output: asset filenames are derived from content hashes rather than modification times.

= 1.5.0 =

  • Pre-flight report. Before this, unsupported pages were exported silently and broke in production.