Static HTML Output is a WordPress plugin that generates a static HTML copy of a WordPress site and deploys it to GitHub Pages, Amazon S3, Netlify, or similar static hosting, making WordPress sites faster and more secure by removing server-side PHP rendering.
What is Static HTML Output?
Static HTML Output is an open-source WordPress plugin maintained by Leon Stafford that converts a running WordPress site into a static HTML archive. It takes the live site as input, crawls its URLs, and produces a deployable static copy containing pages, assets, and uploads. The plugin runs on WordPress and is distributed via Packagist, with a GitHub repository under the WP2Static organization. Developers control generation and deployment through WP-CLI commands.
What makes Static HTML Output stand out?
- WP-CLI integration — Provides four commands under
wp statichtmloutput:options,generate,deploy, anddeploy_cache, enabling scripted static generation and deployment from the command line. - Customizable crawl list — The
statichtmloutput_modify_initial_crawl_listfilter hook lets developers add or remove URLs from the initial list of pages to crawl, allowing precise control over which content is exported. - Post-deploy trigger — The
statichtmloutput_post_deploy_triggeraction hook runs after deployment and passes an archive object containing settings, path, name, and other metadata for further automation. - Multiple deployment targets — Supports GitHub Pages, Amazon S3, and Netlify out of the box, as stated on the project page.
- CI/CD friendly — By exposing WP-CLI commands and hooks, it can be integrated into continuous integration and continuous deployment pipelines for automated static builds.
- Composer-based development — The repository includes a
composer.jsonwith test and coverage scripts (composer test,composer coverage), and acomposer buildcommand to produce an installer zip.
Who should use Static HTML Output?
- WordPress site owners who want to increase security and page load speed by serving a static version of their site instead of executing PHP on each request.
- Developers and DevOps engineers who want to connect WordPress into a CI/CD workflow, generating and deploying static artifacts automatically with WP-CLI.
- People hosting on static platforms such as GitHub Pages, S3, or Netlify who need a reliable way to export their WordPress content without manually maintaining a separate static site generator.
What can you do with Static HTML Output?
- Publish a blog to GitHub Pages: Run
wp statichtmloutput generateandwp statichtmloutput deployto create a static copy of your WordPress blog and push it to a GitHub Pages repository. - Host on Amazon S3: Use the deploy command to upload the generated static archive to an S3 bucket, giving you low-cost, scalable static hosting.
- Automate with Netlify: Generate a static copy for Netlify deployments and use the post-deploy hook to trigger custom tasks like cache purging, notifications, or external API calls.
How does Static HTML Output work?
After installation, you run the WP-CLI commands to create and deploy the static archive. The plugin crawls the site's URLs, collects the rendered HTML, and packages it into a deployable archive. The two hooks give developers control: one to modify the crawl list before generation and one to act on the archive after deployment.
Pros and cons
- Pros: Simple WP-CLI interface, support for multiple static hosts, filter and action hooks for customization, and open-source availability with Composer tooling.
- Cons: The plugin UI lacks built-in localisation; the README suggests using a browser extension or translation service for the interface.
Alternatives
- WP2Static — Another WordPress static-site generator from the same maintainer, presented as the newer project on the same GitHub organization.
- SimplerStatic — A simpler WordPress static-site generator also maintained by Leon Stafford, listed alongside Static HTML Output on the project page.
FAQ
What deployment targets does Static HTML Output support?
It supports GitHub Pages, Amazon S3, and Netlify, as stated on the project page. The post-deployment hook can also be used to trigger custom actions for other platforms.
What WP-CLI commands does Static HTML Output provide?
It provides options, generate, deploy, and deploy_cache under the wp statichtmloutput command. You can get help for any command by appending --help.
Does Static HTML Output support hooks?
Yes. It includes a filter hook (statichtmloutput_modify_initial_crawl_list) to adjust the URLs that are crawled and an action hook (statichtmloutput_post_deploy_trigger) that runs after deployment with the archive object.
How do I build an installer for Static HTML Output?
Run composer build INSTALLER_FILENAME, which generates an installer zip in your $HOME/Downloads directory. On Windows, you need the zip utility and a shell like Git Bash.








