Skip to content

Creating a post does not create a revision #564

@swissspidy

Description

@swissspidy

When testing #563 I realized there's a difference in behavior for revisions between wp-admin vs WP-CLI.

In the block editor, when I publish a new post, there are 2 new entries in wp_posts: one for the post (ID 1), and one for an identical revision (ID 2). When I then update the post with ID 1, a new revision (ID 3) is added. This way, I can easily restore the original content by restoring post with ID 2.

With WP-CLI, when I run wp post create, only one entry is added (ID 1). No revision. When I then make an edit, a revision is created for the edit, but the original content is lost.

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions