06 Nov 2017

Howto purge plenty of spam comments

Over the years plenty of spam comments piled up in zyanklee.de’s database (around 2k). Deleting them all manually would have been a massive chore, but lately I found help in the disguise of wp cli (https://wp-cli.org/).

Deletion of this many comments took me a few seconds:

wp comment list --field=comment_ID --status=spam | xargs wp comment delete --force