PHPackages                             trepmal/wp-revisions-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. [CLI &amp; Console](/categories/cli)
4. /
5. trepmal/wp-revisions-cli

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

trepmal/wp-revisions-cli
========================

Manage revisions

v1.0(6y ago)15736.4k—8.3%25[3 PRs](https://github.com/trepmal/wp-revisions-cli/pulls)MITPHPCI passing

Since Mar 7Pushed 11mo ago11 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

trepmal/wp-revisions-cli
========================

[](#trepmalwp-revisions-cli)

Manage revisions

[![Testing](https://github.com/trepmal/wp-revisions-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/trepmal/wp-revisions-cli/actions/workflows/testing.yml)

Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)

Using
-----

[](#using)

This package implements the following commands:

### wp revisions list

[](#wp-revisions-list)

List all revisions

```
wp revisions list [--post_type=] [--post_id=] [--fields=] [--yes] [--format=]

```

**OPTIONS**

```
[--post_type=]
	List revisions for given post type(s).

[--post_id=]
	List revisions for given post. Trumps --post_type.

[--fields=]
	Comma-separated list of fields to be included in the output.
	---
	default: ID,post_title,post_parent
	---

[--yes]
	Answer yes to the confirmation message.

[--format=]
	Format to use for the output. One of table, csv or json.

```

**EXAMPLES**

```
wp revisions list
wp revisions list --post_id=2
wp revisions list --post_type=post,page

```

### wp revisions dump

[](#wp-revisions-dump)

Delete all revisions

```
wp revisions dump [--hard] [--yes]

```

**OPTIONS**

```
[--hard]
	Hard delete. Slower, uses wp_delete_post_revision() to handle additional meta, caches, or other actions. Alias to `wp revisions clean -1 --hard`

[--yes]
	Answer yes to the confirmation message.

```

**EXAMPLES**

```
wp revisions dump

```

### wp revisions clean

[](#wp-revisions-clean)

Delete old revisions

```
wp revisions clean [] [--filter-keep] [--post_type=] [--after-date=] [--before-date=] [--post_id=] [--hard] [--dry-run]

```

**OPTIONS**

```
[]
	Number of revisions to keep per post. Defaults to WP_POST_REVISIONS if it is an integer.

[--filter-keep]
	Allow `wp_revisions_to_keep` filter to override keep number.

[--post_type=]
	Clean revisions for given post type(s). Default: any

[--after-date=]
	Clean revisions on posts published on or after this date (GMT). Default: none.

[--before-date=]
	Clean revisions on posts published before this date (GMT). Default: none.

[--post_id=]
	Clean revisions for given post.

[--hard]
	Hard delete. Slower, uses wp_delete_post_revision() to handle additional meta, caches, or other actions.

[--dry-run]
	Dry run, just a test, no actual cleaning done.

```

**EXAMPLES**

```
wp revisions clean
wp revisions clean 5
wp revisions clean --post_id=2
wp revisions clean 5 --post_type=post,page
wp revisions clean --after-date=2015-11-01 --before-date=2015-12-30
wp revisions clean --after-date=2015-11-01 --before-date=2015-12-30 --dry-run

```

### wp revisions generate

[](#wp-revisions-generate)

Generate revisions

```
wp revisions generate [] [--post_type=] [--post_id=] [--oldest_date=]

```

**OPTIONS**

```
[]
	Number of revisions to generate per post. Default 15

[--post_type=]
	Generate revisions for given post type(s). Default any

[--post_id=]
	Generate revisions for given post.

[--oldest_date=]
	Oldest date for revisions. Default: 5 years ago

```

**EXAMPLES**

```
wp revisions generate 10
wp revisions generate --post_id=2
wp revisions generate 2 --post_type=post,page

```

### wp revisions status

[](#wp-revisions-status)

Get WP\_POST\_REVISIONS value

```
wp revisions status

```

**OPTIONS**

**EXAMPLES**

```
wp revisions status

```

Installing
----------

[](#installing)

Installing this package requires WP-CLI v2.12 or greater. Update to the latest stable release with `wp cli update`.

Once you've done so, you can install the latest stable version of this package with:

```
wp package install trepmal/wp-revisions-cli:@stable
```

To install the latest development version of this package, use the following command instead:

```
wp package install trepmal/wp-revisions-cli:dev-master
```

Contributing
------------

[](#contributing)

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

### Reporting a bug

[](#reporting-a-bug)

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should [search existing issues](https://github.com/trepmal/wp-revisions-cli/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/trepmal/wp-revisions-cli/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).

### Creating a pull request

[](#creating-a-pull-request)

Want to contribute a new feature? Please first [open a new issue](https://github.com/trepmal/wp-revisions-cli/issues/new) to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.

Support
-------

[](#support)

GitHub issues aren't for general support questions, but there are other venues you can try:

*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.3% of commits — single point of failure

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

Unknown

Total

1

Last Release

2264d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26709ef9658cb50dd6ed5b8f0d61796c071d63a05f13ee40ab3211f62c8620f6?d=identicon)[trepmal](/maintainers/trepmal)

---

Top Contributors

[![trepmal](https://avatars.githubusercontent.com/u/251183?v=4)](https://github.com/trepmal "trepmal (100 commits)")[![philipjohn](https://avatars.githubusercontent.com/u/136342?v=4)](https://github.com/philipjohn "philipjohn (7 commits)")[![alexisbellido](https://avatars.githubusercontent.com/u/305270?v=4)](https://github.com/alexisbellido "alexisbellido (2 commits)")[![brownian](https://avatars.githubusercontent.com/u/483441?v=4)](https://github.com/brownian "brownian (2 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (1 commits)")

### Embed Badge

![Health badge](/badges/trepmal-wp-revisions-cli/health.svg)

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

###  Alternatives

[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11610.4M52](/packages/wp-cli-i18n-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

768.0M30](/packages/wp-cli-db-command)[wp-cli/server-command

Launches PHP's built-in web server for a specific WordPress installation.

687.2M5](/packages/wp-cli-server-command)

PHPackages © 2026

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