Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This WP CLI command deletes all comments on a post with ID of "123". You can do other things, like add a "status=spam" or whatever to the comment list command as well.
wp comment delete $(wp comment list --post_id=123 --format=ids)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment