Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Static HTML Output

CircleCI Packagist PHPStan

WordPress plugin to generate a static copy of your site and deploy to GitHub Pages, S3, Netlify, etc. Increase security, pageload speed and hosting options. Connect WordPress into your CI/CD workflow.

Other WordPress SSGs I mantain

WP-CLI commands

  • wp statichtmloutput COMMAND

Where COMMAND can be any of:

  • options
  • generate
  • deploy
  • deploy_cache

Get help for any command by appending --help


Modify the initial list of URLs to crawl

  • statichtmloutput_modify_initial_crawl_list
  • Filter hook



example usage

function add_additional_urls( $url_queue ) {
    $additional_urls = [

    $url_queue = array_merge(

    return $url_queue;

add_filter( 'statichtmloutput_modify_initial_crawl_list', 'add_additional_urls' );

Post-deployment hook

  • statichtmloutput_post_deploy_trigger
  • Action hook



example usage

function printArchiveInfo( $archive ) {
    error_log( print_r( $archive, true ) );

add_filter( 'statichtmloutput_post_deploy_trigger', 'printArchiveInfo' );

example response

Archive Object
    [settings] => Array
            [selected_deployment_option] => github
            [baseUrl] =>
            [wp_site_url] => http://example.test/
            [wp_site_path] => /srv/www/
            [wp_uploads_path] => /srv/www/
            [wp_uploads_url] => http://example.test/app/uploads
            [wp_active_theme] => /wp/wp-content/themes/twentyseventeen
            [wp_themes] => /srv/www/
            [wp_uploads] => /srv/www/
            [wp_plugins] => /srv/www/
            [wp_content] => /srv/www/
            [wp_inc] => /wp-includes
            [crawl_increment] => 1

    [path] => /srv/www/
    [name] => wp-static-html-output-1547668758
    [crawl_list] =>
    [export_log] =>

Contributing / development

Contributions are very much welcome! Please don't be intimidated to file an issue, create a Pull Request or email me (Leon)


  • git clone
  • cd static-html-output
  • composer install
  • composer test
  • composer coverage (optional coverage generation, requires Xdebug)

Building an install .zip file

  • composer build INSTALLER_FILENAME

This will create the installer and place in your $HOME/Downloads directory.

On Windows, you will need the zip utility available to build an installer. I recommend using Git Bash shell and then manually installing the zip utility as per these instructions

Localisation / translations

Localisation within the plugin isn't supported. Rather, it's recommended to use a browser extension if you need help translating the UI or you can run our documentation pages through any translation service.


Please raise an issue here on GitHub or on the plugin's support forum.