Convert pages to static HTML files via CLI or the admin interface.
ProcessWire Module that converts pages to static HTML files via CLI or the admin interface. Useful in CI/CD scripts or to use ProcessWire as a static site generator.
Install via the ProcessWire modules directory. See Instructions.
The configuration option ("Static file path") defines the directory in which the static HTML files and folders are generated. The path is relative to the root directory of your ProcessWire installation. (default:
Navigate to the root folder of your website:
Run the script
Go to Setup > Static Site Generator and click the "Generate" button.
Users need the
staticwire-generate permission in order to run StaticWire.
The module creates a folder structure mirroring the page tree of your website.
In each folder a
index.html file with the corresponding page content is generated.
To generate the static HTML structure the
$page->render() function is called on each page.
To handle assets and uploads you have multiple options:
- copy the folders (
site/templates/scripts, etc.) to the output directory (
- copy them in your CI/CD script
- create symlinks if the static site and your ProcessWire installation are running on the same server
- [ ] Supprt paginated templates
- [ ] Download static site as *.zip archive