Last active
June 12, 2022 20:59
-
-
Save lukecav/646da8142102615e0aeffe75538d9f83 to your computer and use it in GitHub Desktop.
Delete all comments marked as hold and spam using WP-CLI
This file contains 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 --status=hold --format=ids) | |
wp comment delete $(wp comment list --status=spam --format=ids) |
I think this should use
status=hold
as per WP Comment Query
wp comment delete $(wp comment list --status=hold --format=ids)
works for me.
@davemac thank you so much, it's working fine for me.
K updated the WP-CLI commands.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this should use
status=hold
as per WP Comment Querywp comment delete $(wp comment list --status=hold --format=ids)
works for me.