Delete all post revisions via WP-CLI

wp post delete --force $(wp post list --post_type='revision' --format=ids)Code language: Bash (bash)

Faster with SQL Query:

wp db query "DELETE FROM ${DB_PREFIX}posts WHERE post_type = \"revision\";"Code language: Bash (bash)

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.