Skip to content

Commit

Permalink
v1.2
Browse files Browse the repository at this point in the history
- 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
remyperona authored Jan 26, 2021
2 parents a312682 + df21b13 commit a7eb281
Show file tree
Hide file tree
Showing 4 changed files with 286 additions and 117 deletions.
26 changes: 8 additions & 18 deletions README.md
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`
Loading

0 comments on commit a7eb281

Please sign in to comment.