Stopping WordPress Comment Spam
Install Akismet, then tighten Settings → Discussion: hold comments with links, approve first-time commenters and auto-close old posts. Add one invisible filter — Antispam Bee or a honeypot — and disable comments where they serve no purpose. Published spam hurts SEO; moderation keeps it out of the index.
Written for WordPress owners drowning in bot comments, with the settings, one WP-CLI cleanup command and the honest nofollow history spammers ignore.
knowledge
- Read time
- 5 min
- Sections
- 8
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
Why does spam find WordPress so reliably?
Spam finds WordPress because of scale and default openness: WordPress powers a huge share of the web and its comment system is enabled by default on posts, making every install a standardised, findable target. Bots crawl for wp-comments-post.php and the comment form's predictable field names, then submit at machine speed — templated praise, spun text, links in author names and bodies.
The economics explain the persistence: a vanishing success rate still pays when submission is free and automated. What spam wants is published links. What it costs you is moderation time, database bloat — tens of thousands of stored comments slow queries and fatten backups — and, if moderation lapses, a site that looks abandoned. The fix is the layer stack below, not any single setting.
Layer one: Akismet plus the Discussion settings
Layer one is Akismet screening every incoming comment against its cloud intelligence, backed by strict settings under Settings → Discussion that convert spam from publishable to moderated. Akismet auto-trashes obvious spam and holds questionable comments; personal blogs select the name-your-price tier, commercial sites need a paid plan (verify current terms at akismet.com).
- First-time approval: enable "Comment author must have a previously approved comment" — new commenters wait for a human, regulars publish instantly.
- Manual approval: "Comment must be manually approved" for full control, or skip it once layer two holds.
- Link threshold: set Comment Moderation to hold comments containing one link — genuine comments rarely carry any, spam almost always carries at least one.
- Legacy channels: turn off trackbacks and pingbacks; most sites gain nothing from them.
- Auto-close: close comments on posts older than 30 or 60 days, when most genuine discussion has ended.
Together these change spam's economics: the bot's submission still costs it nothing, but nothing publishes without passing you.
Layer two: Antispam Bee, CleanTalk or a honeypot?
Pick one technical filter to run beside Akismet: Antispam Bee for a no-account rules engine, CleanTalk for invisible coverage of every form, or a honeypot plugin that rejects bots silently. Stacking four or five filters instead raises the false-positive rate — real readers start landing in the spam folder.
| Option | How it works | Best for |
|---|---|---|
| Antispam Bee | No cloud account; trusts commenters with a verified Gravatar, flags BB code, can restrict by language or country, deletes stored spam after a set number of days | Sites that want a free, local filter |
| CleanTalk | Invisible, no CAPTCHA; one subscription covers comments, registration and contact forms | Sites with many form types |
| Honeypot plugins | Add a form field humans never see; bots fill it and are rejected | Light, zero-friction protection |
Layer sensibly: Akismet covers known spam sources; one technical filter covers novel bots. Add more only when spam actually gets through those two. If spam arrives through your contact form rather than comments, the setup is covered in adding a contact form in WordPress.
How do you bulk-delete thousands of spam comments?
An inherited pile needs bulk removal, not one-by-one trashing: clear flagged spam in one click, filter the pending queue by author, IP or date, and use WP-CLI for the largest cleanups.
- Flagged spam: Comments → Spam, then the Empty Spam button deletes everything flagged in one click.
- Pending queue: filter by author, IP address or date range and clear each batch with bulk actions.
- WP-CLI (hosts with SSH): remove every awaiting-moderation comment in one pass — after a database backup:
wp comment delete $(wp comment list --status=hold --format=ids) - Empty the trash so the rows actually leave the database.
Finish by confirming the layers above are switched on — otherwise the pile rebuilds within days. The keyword field under Settings → Discussion helps it stay down: paste spam phrases, suspicious domains and bad IPs into Disallowed Comment Keys, one per line; community-maintained lists on GitHub are a better starting point than assembling your own, and you prune what over-triggers.
When should you disable comments instead of filtering them?
Disable comments where they serve no purpose: brochure sites, service pages and product catalogues gain nothing from comments and pay spam's tax regardless. The honest assessment question comes first — does this site earn real replies?
- Per page: every post editor carries a Discussion panel (enable it via Options if hidden) with an Allow comments checkbox — pages default to off, posts to on.
- Site-wide for future posts: Settings → Discussion, uncheck "Allow people to submit comments on new posts"; existing posts need a bulk quick-edit sweep.
- Middle paths: auto-close after 30 days, or require registration to comment.
A blog with genuine conversation should keep comments and filter spam; a five-page business site should not be moderating anything.
Do spam comments hurt SEO?
Published spam hurts: pages bristling with pharmaceutical links read as neglect to crawlers, and Google's guidance for years has been to moderate or disable unmanaged comment sections. Held-but-unpublished spam does not directly harm rankings — search engines never see it — but the bloat tax is real: database size, backup weight, query overhead.
The link economy deserves honesty on both sides. Comment links have carried rel="nofollow" in WordPress since the 2005 nofollow initiative, and since WordPress 5.3 (November 2019) comment links carry rel="nofollow ugc" — the ugc value telling search engines the content is user-generated. So the ranking value spammers chase is largely worthless; the harm is to your site's appearance and performance, not a gain to them. Bottom line: moderate what publishes, keep the library lean, disable comments where they serve nothing — and put the recovered attention into content.
If spam has become a security problem rather than a moderation one, WebJi®'s WordPress security services handle cleanup, and the 24-point WordPress security checklist continues from there; the recovery path after a real compromise is the hacked-site fix guide.
Frequently asked questions
How do I stop spam comments on WordPress?
Layer it: connect Akismet, tighten Settings → Discussion (hold comments with links, approve first-time commenters, auto-close old posts), add one technical filter such as Antispam Bee or a honeypot, and disable comments where they serve no purpose. That stack stops nearly all bot spam.
Is Akismet free for business websites?
No. Akismet's name-your-price tier covers personal, non-commercial sites; commercial sites pick a paid plan. The plugin itself is free from the WordPress directory — only the API key tier differs. Check akismet.com for current terms before relying on the free tier commercially.
Are comment links dofollow or nofollow in WordPress?
Nofollow. WordPress has added rel="nofollow" to comment links since the 2005 nofollow initiative, and since version 5.3 (November 2019) they carry rel="nofollow ugc" — the ugc value marking them as user-generated content. Spammers chase links that pass almost no ranking value.
Why did I suddenly get hundreds of spam comments?
Bots crawl the web for open comment forms and reach every WordPress site eventually. A surge usually means a spam farm indexed your posts, or an older post with an open form was rediscovered. Auto-closing comments on posts older than 30–60 days removes most of the rediscovered surface.
Can I delete pending comments with WP-CLI?
Yes, on hosts with SSH access: run wp comment delete $(wp comment list --status=hold --format=ids) to remove every awaiting-moderation comment in one pass. Take a database backup first — the command does not ask twice.
Last editorial update: 15 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.