wp comment

Creates, updates, deletes, and moderates comments.

EXAMPLES

# Create a new comment.
$ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli"
Success: Created comment 932.

# Update an existing comment.
$ wp comment update 123 --comment_author='That Guy'
Success: Updated comment 123.

# Delete an existing comment.
$ wp comment delete 1337 --force
Success: Deleted comment 1337.

# Delete all spam comments.
$ wp comment delete $(wp comment list --status=spam --format=ids)
Success: Deleted comment 264.
Success: Deleted comment 262.

SUBCOMMANDS

Name Description
wp comment unspam Unmarks a comment as spam.
wp comment trash Trashes a comment.
wp comment get Gets the data of a single comment.
wp comment meta Adds, updates, deletes, and lists comment custom fields.
wp comment status Gets the status of a comment.
wp comment count Counts comments, on whole blog or on a given post.
wp comment list Gets a list of comments.
wp comment generate Generates some number of new dummy comments.
wp comment create Creates a new comment.
wp comment exists Verifies whether a comment exists.
wp comment spam Marks a comment as spam.
wp comment delete Deletes a comment.
wp comment update Updates one or more comments.
wp comment recount Recalculates the comment_count value for one or more posts.
wp comment approve Approves a comment.
wp comment untrash Untrashes a comment.
wp comment unapprove Unapproves a comment.