I’m trying to delete all wordpress comments with only one word. I found this mysql query to delete all comments at once, but that’s not what I want to achieve:
DELETE FROM wp_comments WHERE comment_approved = '0'
I’m trying to delete all wordpress comments with only one word. I found this mysql query to delete all comments at once, but that’s not what I want to achieve:
DELETE FROM wp_comments WHERE comment_approved = '0'
You must be logged in to post a comment.
DISCLAIMER : Not a WordPress Developer, Just a MySQL DBA
If you have privileges to login to MySQL and query data you could collect all the
comment_ID
values that have one word.You can test this by also seeing the comment_content
Using the WordPress API, retrieve those
comment_ID
values and delete them.Give it a Try !!!
CAVEAT
Other posts have been given for bulk deleting of comments (none of these are my posts):