-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Enhancement: Enable/disable CDN with specific host and zone (#21) - Enhancement: Add option to trigger sitemap-based preload (#36) - Bugfix: Correctly update the config file on NGINX (#15) - Bugfix: Remove deprecated functions usage (#37) - Bugfix: Clean minified files when using the `clean` command (#25) - Bugfix: Added a new parameter to the `activate-cache` and `deactivate-cache` commands to also update the `htaccess` file on Apache (#22)
- Loading branch information
Showing
4 changed files
with
286 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,21 @@ | ||
|
||
## CLI interface for the WP Rocket | ||
## WP CLI interface for WP Rocket | ||
|
||
This repository contains a [WP-CLI command](https://github.com/wp-cli/wp-cli) for the [WP Rocket](http://wp-rocket.me) plugin. After installing this plugin, you will have access to a `wp rocket` command. | ||
|
||
Currently supported commands: | ||
## Supported commands | ||
|
||
* `wp rocket activate` -- Set WP_CACHE to true. | ||
* `wp rocket deactivate` -- Set WP_CACHE to false. | ||
* `wp rocket activate-cache --htaccess=<true|false>` -- Set WP_CACHE to true and clean WP Rocket cache. To also update the htaccess on Apache, use the additional `htaccess` parameter. | ||
* `wp rocket deactivate-cache --htaccess=<true|false>` -- Set WP_CACHE to false and clean WP Rocket cache. To also update the htaccess on Apache, use the additional `htaccess` parameter. | ||
* `wp rocket clean --post_id=<post_id> --permalink=<permalink> --lang=<lang> --blog_id=<blog_id>` -- Purge cache files. | ||
* `wp rocket clean --confirm` -- Purge cache files without prompting for confirmation (usefull for automation tools/scripts) | ||
* `wp rocket preload` -- Preload cache files. | ||
* `wp rocket regenerate --file=<file>` -- Regenerate .htaccess, advanced-cache.php or the WP Rocket config file. | ||
|
||
* `wp rocket regenerate --file=config --nginx=true` -- regenerate the config file on Nginx hosts. | ||
* `wp rocket cdn --enable=<enable> --host=<host> --zone=<zone>` -- Enable / Disable CDN with the specified host and zone. | ||
|
||
## Installing | ||
|
||
If you're using WP-CLI v0.23.0 or later, you can install this package with: | ||
|
||
``` | ||
wp package install wp-media/wp-rocket-cli | ||
``` | ||
|
||
## Changelog | ||
|
||
### 1.1 | ||
|
||
* Add `regenerate` command. | ||
|
||
### 1.0 | ||
|
||
* Initial release | ||
`wp package install wp-media/wp-rocket-cli` |
Oops, something went wrong.