Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
ProcessWire module that converts pages to static HTML files via CLI or admin interface.
StaticWire is a ProcessWire module that converts ProcessWire pages into a folder of static HTML files, runnable via CLI or the admin interface.
StaticWire is a module for the ProcessWire content management system that turns a ProcessWire site into a static site generator. It takes the site's live pages as input and outputs a directory tree of index.html files, mirroring the page structure. You run it either from the command line with a PHP script or from the admin interface under Setup > Static Site Generator. The module is installed through the ProcessWire modules directory.
php site/modules/StaticWire/cli.php from the website root folder to generate static HTML without opening a browser.staticwire-generate permission restricts who can trigger generation through the admin./static.index.html file.$page->render() method, so templates and output formatting stay consistent with the live site.Developers who want to use ProcessWire as a static site generator for speed or deployment simplicity. It also suits anyone running a ProcessWire site that needs a static snapshot for CI/CD pipelines, and teams who want to publish static HTML without hosting the full CMS.
/static folder to a web server or CDN.Navigate to the website root and run php site/modules/StaticWire/cli.php, or click "Generate" in the admin. The module walks the ProcessWire page tree, creates a folder structure that mirrors it, and calls $page->render() on every page to write an index.html file into the corresponding folder. Assets like CSS and uploaded files must be copied or symlinked separately.
For a more advanced solution, the page points to ProCache, a ProcessWire module by Ryan Cramer that provides caching and static file delivery within ProcessWire itself.
No. StaticWire does not copy assets or uploaded files. You need to copy the relevant folders (for example site/assets/files, site/templates/style, site/templates/scripts) into the output directory yourself, either manually, in a CI/CD script, or by creating symlinks.
Go to the root folder of your ProcessWire installation and run php site/modules/StaticWire/cli.php. This generates the static HTML structure without using the admin interface.
Users need the staticwire-generate permission. Without it, the Generate button under Setup > Static Site Generator will not work for that user.
Yes. The configuration option "Static file path" sets where the static HTML files and folders are generated. It is relative to the ProcessWire root directory, with a default of /static.
Not yet. Supporting paginated templates is on the project's roadmap, as is downloading the generated static site as a zip archive.
