Unlock Hidden Powers: Transform Your WordPress Workflow with WP-CLI Today!

Unlock Hidden Powers: Transform Your WordPress Workflow with WP-CLI Today!

You can find out more about the wp post generate command in the WordPress Developer Handbook.

wp post update

You can also update or change existing posts using WP-CLI. 

The wp post update command flags let you update the title, body, excerpt, publish date, status, and author.

As you can update multiple posts at once, this command is useful for changing the status for multiple posts from published to draft or assigning a different user as the author. 

When updating multiple posts with a single command, you must refer to the posts using their ID. To see the IDs for each post, use this command:

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38