PHPackages                             wp-media/wp-rocket-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. wp-media/wp-rocket-cli

ActiveWp-cli-package[Caching](/categories/caching)

wp-media/wp-rocket-cli
======================

Add a `wp rocket` command to support the WP Rocket plugin

v1.3(5y ago)73129.4k—1.9%38[11 issues](https://github.com/wp-media/wp-rocket-cli/issues)[5 PRs](https://github.com/wp-media/wp-rocket-cli/pulls)1MITPHPPHP &gt;=5.6

Since May 23Pushed 2y ago15 watchersCompare

[ Source](https://github.com/wp-media/wp-rocket-cli)[ Packagist](https://packagist.org/packages/wp-media/wp-rocket-cli)[ Docs](https://github.com/wp-media/wp-rocket-cli)[ RSS](/packages/wp-media-wp-rocket-cli/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelog (5)DependenciesVersions (7)Used By (1)

WP CLI interface for 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.

Supported commands
------------------

[](#supported-commands)

- `wp rocket activate-cache --htaccess=` -- 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=` -- 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= --permalink= --lang= --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=` -- 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= --host= --zone=` -- Enable / Disable CDN with the specified host and zone.
- `wp rocket export` -- Exports the WP Rocket settings as a json file to the current directory.
- `wp rocket import --file=settings.json` -- Imports the settings contained in the provided json file.

Installing
----------

[](#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`

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~621 days

Total

5

Last Release

1893d ago

PHP version history (2 changes)1.0PHP &gt;=5.3.0

v1.2PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5564218f7cd2ccf4542a09b7c5436e61e6b370c97fb3b04db1c5bbc0cc67e3c1?d=identicon)[wpmedia](/maintainers/wpmedia)

---

Top Contributors

[![GeekPress](https://avatars.githubusercontent.com/u/1285409?v=4)](https://github.com/GeekPress "GeekPress (9 commits)")[![crystinutzaa](https://avatars.githubusercontent.com/u/45258937?v=4)](https://github.com/crystinutzaa "crystinutzaa (3 commits)")[![remyperona](https://avatars.githubusercontent.com/u/3465180?v=4)](https://github.com/remyperona "remyperona (3 commits)")[![engahmeds3ed](https://avatars.githubusercontent.com/u/15707971?v=4)](https://github.com/engahmeds3ed "engahmeds3ed (2 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (2 commits)")[![ramonfincken](https://avatars.githubusercontent.com/u/1746097?v=4)](https://github.com/ramonfincken "ramonfincken (1 commits)")[![cennis91](https://avatars.githubusercontent.com/u/1178816?v=4)](https://github.com/cennis91 "cennis91 (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![herewithme](https://avatars.githubusercontent.com/u/898608?v=4)](https://github.com/herewithme "herewithme (1 commits)")[![iCaspar](https://avatars.githubusercontent.com/u/7462998?v=4)](https://github.com/iCaspar "iCaspar (1 commits)")[![marcinkrzeminski](https://avatars.githubusercontent.com/u/2551613?v=4)](https://github.com/marcinkrzeminski "marcinkrzeminski (1 commits)")[![prajapatisagar](https://avatars.githubusercontent.com/u/23038911?v=4)](https://github.com/prajapatisagar "prajapatisagar (1 commits)")

---

Tags

cachewp-clirocket

### Embed Badge

![Health badge](/badges/wp-media-wp-rocket-cli/health.svg)

```
[![Health](https://phpackages.com/badges/wp-media-wp-rocket-cli/health.svg)](https://phpackages.com/packages/wp-media-wp-rocket-cli)
```

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k686.9M1.3k](/packages/psr-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[beste/in-memory-cache

A PSR-6 In-Memory cache that can be used as a fallback implementation and/or in tests.

2512.2M6](/packages/beste-in-memory-cache)[anahkiasen/flatten

A package for the Illuminate framework that flattens pages to plain HTML

33313.0k](/packages/anahkiasen-flatten)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
