Revisions silently bloat the database on content-heavy sites. Safe to run – revisions are regenerated automatically as you edit.
Steps to use:
- Run the first command to see the count
- Run the delete command –
--forcebypasses the trash (revisions can’t be trashed anyway) - Run the count again to confirm it returns
0
Note: If you have thousands of revisions, the delete command may time out. In that case run it in batches: add
--posts_per_page=500to the list command and repeat.
# See how many revisions exist before deleting
wp post list --post_type=revision --format=count
# Delete all revisions
wp post delete $(wp post list --post_type=revision --format=ids) --force
# Verify they're gone
wp post list --post_type=revision --format=count
Tested on
WordPress 7.1
Reported by the author on October 7, 2026. WPFolks has not verified this.