Created
April 12, 2017 17:01
-
-
Save krogsgard/4198574c3c5294efc380357673e03b6a to your computer and use it in GitHub Desktop.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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