Extending WP2Static



Extending WP2Static

WP2Static aims to be as extensible as possible, while maintaining a minimal, solid core.

WP-CLI commands allow for easily piping WP2Static commands into your own scripted workflows and programmatic access to execute and modify WP2Static behaviour.

Filters and actions

In lieu of comprehensive documentation about each action/hook/filter available in WP2Static and its Add-ons, I’ll just dump the current available actions and filters from within the core WP2Static plugin’s codebase.

Below list is derived from running git grep -e do_action --or -e apply_filter. If you’re looking for a specific action/filter, please search the source code of the core WP2Static plugin or its Add-ons. If there’s a a hook/filter you need added, please contact me to request or send a diff with the code if you’ve you’ve already figured out how to add it.



If it’s not apparent what these actions/filters do when you look at the surrounding code, let me know and I’ll add/expand comments. These docs can’t be relied upon to be as up to date as the code.

Try Strattic!

Try Strattic for generating a static version of your WordPress website.

Strattic is an end-to-end managed WordPress to static publishing and hosting platform. Leon, the creator of WP2Static, has joined the expert team at Strattic, building a fully automated, end-to-end solution for secure and performant WordPress hosting. Try it free for 14 days, no credit card required.

Site menu