Skip to main content
Cookbook Maintenance

Bulk delete spam comments with AI

Clear a spam backlog in bulk with an approved database cleanup, then tighten comment settings to slow new spam.

Difficulty Beginner
Time ~10 min
Tools run_wp_cli

Prerequisites

A connected site and a recent backup, since removing spam comments is permanent.

The prompt
My site has a large backlog of spam comments. Help me clear it out and stop new spam. Work in stages and report before you remove anything.

1. Count how many spam comments I have and show me a few examples so I know what we are removing. Then stop.

I will take a backup before you delete anything.

2. After I confirm, remove all spam comments. WPVibe has no single delete-all-spam command, so do this with a database cleanup: preview the number of rows affected and let me approve it before it runs, and only match comments marked as spam so anything held for normal moderation is left alone. Then remove any comment metadata left orphaned by the deletion.

3. Then configure comment settings to reduce future spam: [hold all comments for moderation OR only hold comments that contain links], require a name and email to comment, close comments on posts older than [30] days, and flag comments containing more than [2] links.

List every setting you changed with its new value, and confirm how many spam comments were removed.

Already connected to WPVibe?

Skip the copy-paste. Just ask your AI for the “Bulk delete spam comments with AI” recipe, or describe the task, and WPVibe runs these steps on your own site.

Spam comments do not arrive one at a time. They pile up in the hundreds or thousands, and once they do the moderation queue is useless, the database is heavier than it needs to be, and every fresh batch is another round of notifications. Clearing them by hand, twenty per screen, is the kind of job you start once and never finish, so most sites just let the pile grow.

WPVibe clears the backlog and then closes the door behind it. It counts the spam and shows you a sample first so you know the scope, removes it in bulk through a database cleanup that it previews and asks you to approve before anything is deleted, and then tightens your comment settings so new spam has a harder time: hold comments for moderation, require a name and email, close comments on old posts, and flag anything stuffed with links. Nothing is removed without that approval step.

Because deleting comments is permanent, take a backup before you run this. Ask the assistant to report the spam count before it removes anything, approve the cleanup when WPVibe shows you the row count, and have it list every setting it changed so you can confirm the lockdown is what you wanted. Legitimate comments held for moderation are untouched, only the spam is cleared.

Outcome

Your spam comment backlog is cleared and comment settings are tightened so new spam has a harder time landing.