StaticWP
Converts your blog into a static site., (*1)
Description
Have performance issues? StaticWP converts your blog into a static site, so you don't have to worry., (*2)
Installation
Upload the StaticWP plugin to your site, and activate it! Yep, that's it!, (*3)
Optionally, you can set your web server to look in the storage directory (default is staticwp/_site/
in your uploads directory) for files prior to letting Wordpress take over control., (*4)
Hooks
Need to modify how StaticWP works? Look to an action or a filter to accomplish what you need., (*5)
Actions
staticwp_pre_cache_hit
Called prior to outputting a cache hit to the client., (*6)
Params:, (*7)
-
$_SERVER['REQUEST_URI']
- string|null
staticwp_post_cache_hit
Called after outputting a cache hit to the client., (*8)
Params:, (*9)
-
$_SERVER['REQUEST_URI']
- string|null
staticwp_cache_miss
Called when a requested post does not exist in the cache., (*10)
Params:, (*11)
-
$_SERVER['REQUEST_URI']
- string|null
staticwp_pre_cache_update
Called prior to saving a post's static HTML to disk., (*12)
Params:, (*13)
staticwp_post_cache_update
Called after saving a post's static HTML to disk., (*14)
Params:, (*15)
Filters
staticwp_preload_post_types
Allows a developer to modify the list of post types to preload.
Default/starting value is array('post', 'page')
., (*16)
Params:, (*17)
-
$post_types
- array(string)
staticwp_preload_{$post_type}_posts
Allows a developer to modify the list of posts to preload. By
default, all published posts of type $post_type
will be used
and will be ordered by post_date
in descending order., (*18)
Params:, (*19)
-
$post_ids
- array(integer)
staticwp_cache_hit_contents
Allows a developer to modify the contents of a post's static
HTML prior to ouputting to the client., (*20)
Params:, (*21)
staticwp_cache_update_contents
Allows a developer to modify the contents of a post's static
HTML prior to saving to disk., (*22)
Params:, (*23)
-
$contents
- string
-
$post_id
- integer
staticwp_cache_destination
Allows a developer to modify the storage directory for the static
HTML files., (*24)
Params:, (*25)
Changelog
1.5.0
Release Date - 25th April, 2015, (*26)
- Add actions.
- Add filters.
- Fix bug with
StaticWP\StaticWP
not qualifying Exception
before its use.
1.4.2
Release Date - 25th April, 2015, (*27)
- Fix issue with preload.
- Fix issue with uninstall.
1.4.1
Release Date - 9th March, 2015, (*28)
1.4.0
Release Date - 9th March, 2015, (*29)
- Make preloading safer.
- Ensure more than posts are compiled.
- Allow comments to be added
- Fix bug when files are recompiled.
1.3.0
Release Date - 4th March, 2015, (*30)
- Refactor frontend and admin into separate classes.
- Abstracted HTML into templates and
StaticWPView
.
- Add admin menu pages.
- Allow users to preload site.
1.2.0
Release Date - 4th March, 2015, (*31)
- Improve directory resolution.
1.1.1
Release Date - 4th March, 2015, (*32)
- Fix bug with plugin name.
1.1.0
Release Date - 3rd March, 2015, (*33)
- Add deactivation hook for cleanup.
- Add uninstall hook for cleanup.
- Move storage directory to uploads directory.
1.0.0
Release Date - 3rd March, 2015, (*34)
- Initial release.
- Does basic static file generation.
- Sends file if it exists only for
GET
requests.
License
StaticWP is released under the MIT License., (*35)
See LICENSE for details., (*36)