• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    PHP
  • License
    The Unlicense
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Static HTML Output Plugin for WordPress

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

Hooks

Modify the initial list of URLs to crawl

  • statichtmloutput_modify_initial_crawl_list
  • Filter hook

signature

apply_filters(
    'statichtmloutput_modify_initial_crawl_list',
    $url_queue
);

example usage

function add_additional_urls( $url_queue ) {
    $additional_urls = [
        'http://mydomain.com/custom_link_1/',
        'http://mydomain.com/custom_link_2/',
    ];

    $url_queue = array_merge(
        $url_queue,
        $additional_urls
    );

    return $url_queue;
}

add_filter( 'statichtmloutput_modify_initial_crawl_list', 'add_additional_urls' );

Post-deployment hook

  • statichtmloutput_post_deploy_trigger
  • Action hook

signature

do_action(
  'statichtmloutput_post_deploy_trigger',
  $archive
);

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] => https://leonstafford.github.io/demo-site-wordpress-static-html-output/
            [wp_site_url] => http://example.test/
            [wp_site_path] => /srv/www/example.com/current/web/wp/
            [wp_uploads_path] => /srv/www/example.com/current/web/app/uploads
            [wp_uploads_url] => http://example.test/app/uploads
            [wp_active_theme] => /wp/wp-content/themes/twentyseventeen
            [wp_themes] => /srv/www/example.com/current/web/app/themes
            [wp_uploads] => /srv/www/example.com/current/web/app/uploads
            [wp_plugins] => /srv/www/example.com/current/web/app/plugins
            [wp_content] => /srv/www/example.com/current/web/app
            [wp_inc] => /wp-includes
            [crawl_increment] => 1
        )

    [path] => /srv/www/example.com/current/web/app/uploads/wp-static-html-output-1547668758/
    [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) [email protected].

Developing

  • git clone [email protected]:WP2Static/static-html-output.git
  • 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.

Support

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

More Repositories

1

elementor

The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
PHP
6,578
star
2

wp2static

WordPress static site generator for security, performance and cost benefits
PHP
1,417
star
3

hello-theme

A plain-vanilla theme, best suited for building your site using Elementor plugin. This theme resets the environment and prepares it for smooth operation of Elementor.
PHP
571
star
4

hello-theme-child

PHP
419
star
5

elementor-hello-world

Elementor Sample Plugin
PHP
205
star
6

elementor-developers-docs

Resources and tutorials for Elementor developers.
JavaScript
74
star
7

lokl

Instant WordPress local development for Mac, Win & Linux
Shell
71
star
8

lokl-cli

Interactive script to launch and manage your Lokl sites
Shell
66
star
9

elementor-icons

Elementor Icons Font for elementor project
HTML
46
star
10

wp2static-addon-s3

S3 deployment Add-on for WP2Static
PHP
35
star
11

simplerstatic

A simple WordPress static site generator
PHP
30
star
12

elementor-gallery

JavaScript
30
star
13

wp2static-addon-cloudflare-workers

CloudFlare Workers deployment add-on for WP2Static
PHP
26
star
14

wp2static-addon-zip

Zip deployment addon for WP2Static
PHP
19
star
15

wp2static-addon-netlify

Netlify add-on for WP2Static
PHP
16
star
16

elementor-dev

PHP
10
star
17

wp2static-addon-github

Auto-deploy to GitHub using WP2Static
PHP
10
star
18

wp2static-addon-algolia

Algolia search add-on for WP2Static
PHP
10
star
19

wp2static-addon-advanced-crawling

Advanced Crawling Add-on for WP2Static
PHP
10
star
20

wp2static-addon-sftp

sFTP deployment add-on for WP2Static
PHP
10
star
21

wp2static-addon-bunnycdn

BunnyCDN deployment Add-on for WP2Static
PHP
9
star
22

wp2static-addon-gitlab

GitLab deployment add-on for WP2Static
PHP
8
star
23

wp2static-addon-directory-deployment

WP2Static addon for deploying to a local directory
PHP
8
star
24

wp2static-addon-woocommerce-snipcart

WP2Static Add-on allowing WooCommerce to work on static sites
PHP
8
star
25

wp2static-addon-ftp

FTP deployment Add-on for WP2Static
PHP
7
star
26

wp2static-addon-gcs

Google Cloud Storage deployment addon for WP2Static
PHP
7
star
27

wp2static-addon-bitbucket

Bitbucket Add-on for WP2Static
PHP
7
star
28

wp2static-addon-advanced-html-processor

Advanced HTML Processing Add-on for WP2Static
PHP
7
star
29

WordPressURLDetector

A library to get all public URLs from a WordPress application.
PHP
7
star
30

wp2static-addon-boilerplate

Quickstart guide for creating your own Add-on for WP2Static
PHP
7
star
31

wp2static-addon-azure

Adds Microsoft Azure Cloud Storage as a deployment option for WP2Static
PHP
6
star
32

wp2static-addon-advanced-detection

Advanced detection add-on for WP2Static
PHP
6
star
33

wp2static-addon-static-form-converter

WP2Static add-on to convert WordPress forms to use remote processors
PHP
6
star
34

temporary-login

PHP
5
star
35

wp2staticguzzle

A safely namespaced fork of Guzzle for use in WP2Static core + addons
PHP
4
star
36

wp2staticwww-child-theme

Child theme for WP2Static.com, using Accessible Minimalism as parent theme
PHP
4
star
37

elementor-editor-packages

JavaScript
4
star
38

block-builder

PHP
4
star
39

wp2staticpromises

Safely namespaced fork of guzzle/promises for use in WP2Static
PHP
3
star
40

diagnostic-theme-for-wp2static

Diagnostic theme for testing WP2Static plugin
JavaScript
3
star
41

wp2static-www

WP2Static.com public site
Shell
3
star
42

wp2staticwww-wp-plugin

WordPress plugin for custom functions for WP2Static.com WP site
PHP
3
star
43

wp2static-diagnostics

For diagnostics and benchmarking WP2Static on various hosting platforms
Shell
3
star
44

wp2staticpsr7

Safely namespaced guzzle/psr7 for use in WP2Static
PHP
2
star
45

elementor-sniffs

2
star
46

lokl-www

Lokl.dev's website
Shell
1
star
47

elementor-git-hooks

1
star
48

image-optimization-releases

1
star