Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
WordPress plugin that generates a static copy of your site and deploys to GitHub Pages, S3, Netlify, etc. Increases security and page speed.
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.
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.
wp statichtmloutput: options, generate, deploy, and deploy_cache, enabling scripted static generation and deployment from the command line.statichtmloutput_modify_initial_crawl_list filter hook lets developers add or remove URLs from the initial list of pages to crawl, allowing precise control over which content is exported.statichtmloutput_post_deploy_trigger action hook runs after deployment and passes an archive object containing settings, path, name, and other metadata for further automation.composer.json with test and coverage scripts (composer test, composer coverage), and a composer build command to produce an installer zip.wp statichtmloutput generate and wp statichtmloutput deploy to create a static copy of your WordPress blog and push it to a GitHub Pages repository.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.
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.
It provides options, generate, deploy, and deploy_cache under the wp statichtmloutput command. You can get help for any command by appending --help.
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.
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.
