• Stars
    star
    152
  • Rank 243,978 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 10 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WP-CLI command. Manage post revisions.

trepmal/wp-revisions-cli

Manage revisions

Build Status

Quick links: Using | Installing | Contributing | Support

Using

This package implements the following commands:

wp revisions list

List all revisions

wp revisions list [--post_type=<post-type>] [--post_id=<post-id>] [--fields=<fields>] [--yes] [--format=<format>]

OPTIONS

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

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

[--fields=<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>]
	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

Delete all revisions

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

OPTIONS

[--hard]
	Hard delete. Slower, uses wp_delete_post_revision(). Alias to wp revisions clean -1

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

EXAMPLES

wp revisions dump

wp revisions clean

Delete old revisions

wp revisions clean [<keep>] [--post_type=<post-type>] [--after-date=<yyyy-mm-dd>] [--before-date=<yyyy-mm-dd>] [--post_id=<post-id>] [--hard] [--dry-run]

OPTIONS

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

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

[--after-date=<yyyy-mm-dd>]
	Clean revisions published on or after this date. Default: none.

[--before-date=<yyyy-mm-dd>]
	Clean revisions published on or before this date. Default: none.

[--post_id=<post-id>]
	Clean revisions for given post.

[--hard]
	Hard delete. Slower, uses wp_delete_post_revision().

[--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

Generate revisions

wp revisions generate [<count>] [--post_type=<post-type>] [--post_id=<post-id>]

OPTIONS

[<count>]
	Number of revisions to generate per post. Default 15

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

[--post_id=<post-id>]
	Generate revisions for given post.

EXAMPLES

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

wp revisions status

Get revision status

wp revisions status 

OPTIONS

EXAMPLES

wp revisions status

Installing

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

Once you've done so, you can install this package with:

wp package install [email protected]:trepmal/wp-revisions-cli.git

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. This package follows those policy and guidelines.

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 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. Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, review our bug report documentation.

Creating a pull request

Want to contribute a new feature? Please first open a new issue 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 to make sure it's a pleasant experience. See "Setting up" for details specific to working on this package locally.

Support

Github issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support

This README.md is generated dynamically from the project's codebase using wp scaffold package-readme (doc). To suggest changes, please submit a pull request against the corresponding part of the codebase.

More Repositories

1

blog-extractor

WP-CLI command. Extract single blog from multisite
PHP
99
star
2

my-sites-search

WordPress Plugin. Provides a simple filtering mechanism for finding items in a large My Sites menu.
PHP
70
star
3

export-one-post

WordPress plugin. Export single posts and pages from the edit screen
PHP
34
star
4

meme-gen

Meme generator. PHP + GD
PHP
31
star
5

blog-duplicator

WordPress plugin. WP-CLI only. Duplicate blog on a network.
PHP
24
star
6

log-in-as

WordPress Plugin. Log in as any user.
PHP
16
star
7

Common-Function-Names

Functions and Classes used in tutorials and examples. Higher probability of conflict with other plugins.
PHP
15
star
8

meta-box-media-upload

WordPress plugin. Example. Media upload in meta box
PHP
13
star
9

wp-cli-unconfirmed-users

PHP
12
star
10

option-cache-cli

WPCLI Command for options cache
PHP
11
star
11

scrub-old-posts

WP CLI. Remove posts and associated meta/comments older than given date
PHP
10
star
12

image-gen

WordPress plugin. Generate placeholder images.
PHP
9
star
13

post-gen

WordPress plugin. Generate lorem ipsum posts, optionally with featured images.
PHP
8
star
14

ajax-password-protected

WordPress plugin. Load password protected posts via ajax
PHP
7
star
15

WP-Auto-Update

Shell
6
star
16

ms-files.php-removal-utility

Aids in removing a pre-3.5 Multisite's dependency on ms-files.php
PHP
6
star
17

WP-TinyMCE-Tweaks

assorted quick tweaks for WP's visual editor
PHP
5
star
18

mini-loops

WordPress plugin. Provides widget and shortcodes to display posts. https://wordpress.org/plugins/mini-loops/
PHP
5
star
19

add-image-sizes

WordPress plugin. Create additional image sizes (add_image_size()) via the admin
PHP
4
star
20

View-Blogs-Options

View options across all blogs on a network. Network Admin > Settings > View Blogs Options
PHP
3
star
21

qm-object-cache

PHP
3
star
22

wp-cli-ms

PHP
3
star
23

auto-reset

WordPress plugin to reset a site to defaults
PHP
3
star
24

no-publish-title-check

WordPress plugin: Checks post title for "do not publish" string and prevents publish if found
JavaScript
3
star
25

defenestrate

WordPress theme. Simple.
CSS
2
star
26

Insights

Fork of Vladimir Prelovac's Insights plugin. Namely, no more wp-load.php inclusion, and updated Maps API
JavaScript
2
star
27

wp-hud

WP CLI. Heads-up summary of the WP install
PHP
2
star
28

option-autoload-cli

WP-CLI: Change option autoload value
PHP
2
star
29

nginx-cache-purge

PHP
2
star
30

post-date-swap

WordPress plugin. Swap post dates
PHP
2
star
31

fourkey

C
2
star
32

Most-Exciting

The most exciting WordPress plugin
PHP
2
star
33

simple-invite-codes

Create invite codes to limit registration. Coded quickly, very simple, limited real-world testing
PHP
2
star
34

Break-WP

WordPress plugins for causing errors. On purpose.
PHP
2
star
35

reversed-english

.hsilgnE desreveR .selif snoitalsnart sserPdroW
2
star
36

colorto.me

an experiment in palette sharing
JavaScript
2
star
37

email-signin

WordPress plugin. Bypass typical user/pass login with username/check-email/click-link sign in
PHP
2
star
38

generate-image

Alfred Workflow. Generate image
2
star
39

shortcode-gists

PHP
1
star
40

canadian-cheater

Make that Cheatin' message a little more Canadian, eh?
PHP
1
star
41

Easy-Maps

WordPress plugin to make inserting maps easy.
PHP
1
star
42

sudo-mode

WordPress plugin. Proof of concept for blocking access to certain capabilities until password re-entered. Why? Allow admins to use admin more comfortably for day-to-day tasks.
PHP
1
star
43

wp-2048

WordPress plugin. A 2048 easter egg.
JavaScript
1
star
44

Toolbar-Notepad

WordPress plugin. Creates a per-(logged-in-)user notepad accessible from the toolbar.
PHP
1
star
45

bulk-edit-sticky

WordPress plugin: Bulk edit sticky posts.
PHP
1
star
46

mail-test

WordPress plugin: Easily test wp_mail()
Shell
1
star
47

Random-Quilt-Generator

PHP
1
star
48

qm-alloptions

PHP
1
star
49

frontend-widget-editor

WordPress plugin. Still experimental. Front-end widget editing.
PHP
1
star
50

password-at-registration

WordPress plugin. Set password at registration
PHP
1
star
51

alfred-clipboard-picker

Alfred Workflow.
Shell
1
star
52

live-updates

WordPress plugin. Live post updates
PHP
1
star
53

post-looper

WordPress plugin. Loop through posts (or selected post type) and apply code.
JavaScript
1
star
54

Easy-Albums

An easy album manager for WordPress
PHP
1
star
55

Color-Style-Options

Easily allow for per-post custom styles. Admin creates the rules, writers can just pick colors.
PHP
1
star
56

tinymce-filler

WordPress plugin. Adds a custom dropdown to the tinymce editor for inserting text.
PHP
1
star
57

insert-placeholder-links

WordPress plugin. Insert placeholder links in bulk.
PHP
1
star
58

text-mode-buttons-editor

WordPress plugin. Allows adding new buttons to post editor (TEXT mode only), as well as removing core buttons.
PHP
1
star
59

tinymce-terms

Demo plugin for WordPress
JavaScript
1
star
60

password-protected-galleries

PHP
1
star
61

Custom-Caption-Markup-in-TinyMCE

Use figure/figcation markup in TinyMCE instead of dl/dt/dd
JavaScript
1
star
62

plugin-control

WordPress plugin to control which plugins are manageable from the plugins admin page.
PHP
1
star
63

password-reset

WordPress plugin. Require select users to reset their password at next login.
PHP
1
star
64

wp-version-compare

PHP
1
star
65

featured-image-sizes

WordPress plugin to allow changing of the featured image size
PHP
1
star
66

alfred-bigmoji

PHP
1
star
67

alfred-garfieldize

PHP
1
star