WordPress Maintenance

Managing WordPress Comments: Stopping Spam and Building Real Discussion

Managing WordPress Comments: Stopping Spam and Building Real Discussion

Comments are one of the oldest features of WordPress, and one of the most divisive. On some sites, they’re a thriving part of the content: readers ask questions, share experiences and add insights the original author never thought of. On others, they’re a constant stream of spam, link drops and generic praise written by bots.

I’ve helped clients in both situations. Some wanted to grow genuine discussion. Others had tens of thousands of spam comments clogging their database and wanted them gone for good. The right approach depends on your site’s goals and how much time you can give to moderation.

Here’s how to manage WordPress comments well, whichever direction you choose.

Decide whether you want comments

Before configuring anything, ask whether comments serve your site.

Comments work well when:

  • Your content naturally invites questions or discussion, like tutorials, opinion pieces or community-focused blogs.
  • Someone has time to respond to readers and moderate regularly.
  • Reader contributions add value for future visitors.

Comments may not be worth it when:

  • Your site is mainly a business brochure site.
  • Nobody has time to moderate or respond.
  • Discussion happens elsewhere, like on social media or in a community forum.
  • Comments attract mostly spam.

Unanswered comments and visible spam make a site look neglected. If you won’t manage comments, it’s better to turn them off.

Configure discussion settings

WordPress’s main comment settings are under Settings, then Discussion. Key options include:

Default post settings

  • Allow link notifications from other blogs: controls pingbacks and trackbacks. Most sites should turn these off; they’re mostly used for spam today.
  • Allow people to submit comments on new posts: the global default for comments on new content.

Other comment settings

  • Comment author must fill out name and email: adds a small barrier for casual spam.
  • Users must be registered and logged in to comment: reduces spam significantly but also reduces genuine comments. Useful for membership communities.
  • Automatically close comments on posts older than a certain number of days: one of the most effective anti-spam settings. Spam bots love old posts that rank well. Closing comments after, say, 30 to 90 days removes a huge target.
  • Enable threaded comments: allows replies to specific comments, making conversations easier to follow.
  • Break comments into pages: useful for posts with many comments.

Before a comment appears

  • Comment must be manually approved: every comment waits for moderation.
  • Comment author must have a previously approved comment: first-time commenters are held for moderation; returning approved commenters appear immediately. A good balance for most sites.

Comment moderation and disallowed keys

  • Hold comments with a certain number of links: spam often contains multiple links. Holding comments with two or more links catches a lot.
  • Moderation list: words, IPs or emails that send comments to moderation.
  • Disallowed comment keys: words, IPs or emails that send comments straight to trash.

Use disallowed keys carefully; overly broad words can block legitimate comments.

Stop comment spam

Comment spam is relentless. Bots submit comments to any form they can find, hoping links will get published or indexed. A layered approach works best.

Anti-spam services

An anti-spam plugin connected to a spam filtering service checks every comment against patterns from millions of other sites. It catches the vast majority of automated spam, often before you ever see it. Akismet is the best-known example and comes pre-installed on many WordPress sites, though it requires an API key and has its own terms for commercial sites.

Honeypots and invisible checks

Honeypot fields, which humans don’t see but bots fill in, and time-based checks catch many bots without inconveniencing real people. Some plugins add these to the comment form. Invisible challenge services can also protect comment forms without puzzles.

Close old comments

As mentioned, automatically closing comments on older posts removes the most targeted pages.

Block at the server or firewall

High volumes of spam can strain your server even if it never gets published. A firewall or rate limiting on wp-comments-post.php reduces the load.

Remove the website field

Many spammers comment only for the link in the website field. Some sites remove that field from the comment form, which reduces the incentive to spam. You can do this with a small snippet:

Moderate efficiently

If you allow comments, moderation needs to be a routine:

  • Check pending comments regularly, ideally daily on active sites.
  • Reply to genuine questions; responses encourage more discussion.
  • Remove spam and low-value comments, like generic praise with a link.
  • Use the bulk actions to approve, spam or trash multiple comments at once.

Write a short comment policy explaining what’s welcome and what will be removed. Link to it near the comment form. It sets expectations and makes moderation decisions easier to explain.

Links in comments

WordPress automatically adds rel=”nofollow ugc” to links in comments, signalling to search engines that these are user-generated links you don’t endorse. That reduces the SEO value spammers hope to gain, though it doesn’t stop them trying.

Still, check links in comments before approving. Links to harmful or spammy sites reflect poorly on your site, even with nofollow.

Clean up existing spam

If your database is full of spam and trash comments, clean it up. With WP-CLI:

On sites with huge numbers of spam comments, delete in batches to avoid timeouts. Then optimise the comments tables. Large comments tables slow down queries and inflate backups.

Also check for comment metadata left behind by plugins, which can bloat wp_commentmeta.

Comments and performance

Comments affect performance in a few ways:

  • Pages with many comments load more HTML and run more queries. Pagination helps.
  • Comment forms can add scripts, especially from anti-spam or commenting plugins.
  • Avatars load images from Gravatar for each commenter. On posts with many comments, this adds many requests. You can disable avatars under Settings, then Discussion, or lazy load them.
  • Caching: when a new comment is approved, the page cache needs to clear so it appears. Most caching setups handle this automatically.

Comments and privacy

Comments collect personal data: names, email addresses and IP addresses. WordPress includes a cookie consent checkbox for remembering commenter details, and comment data is included in WordPress’s built-in personal data export and erasure tools.

Mention comments in your privacy policy, and consider whether you need to keep IP addresses long term. Gravatar also involves sending a hash of the commenter’s email to an external service, which some privacy-conscious sites prefer to avoid by disabling avatars.

Disabling comments entirely

If you decide comments aren’t right for your site:

  1. Turn off comments on new posts in Settings, then Discussion.
  2. Close comments on existing posts, using bulk edit or WP-CLI:
<code>wp post list –post_type=post –format=idsxargs -n 50 wp post update –comment_status=closed</code>
  1. Remove comment-related elements from your theme if they still appear.
  2. Optionally use a lightweight plugin to disable comments site-wide, including the comment menu and admin bar items.
  3. Decide what to do with existing comments: keep them visible if valuable, or remove them.

Also turn off pingbacks and trackbacks, and consider disabling comments on media attachment pages, which spammers often target.

Encourage better comments

If you want genuine discussion, invite it. End posts with a specific question rather than a generic “let me know what you think”. Reply to early comments promptly, because readers are more likely to comment when they can see the author responding. Highlight particularly useful comments, or update the post with insights readers shared, crediting them. Over time, a small group of regular commenters often forms, and their contributions make your content more valuable for everyone who visits later.

Even a handful of thoughtful replies each week can change the tone of a comment section.

Frequently asked questions

Do comments help SEO?

Genuine, helpful comments can add relevant content and signal engagement. Spammy or thin comments add nothing and can harm the impression of your site. Quality matters far more than quantity.

What’s the best way to stop comment spam?

Combine an anti-spam service, honeypot or invisible checks, automatic closing of old comments and moderation for first-time commenters. Together they stop almost all spam.

Should I turn off comments?

If nobody will moderate or respond, or comments mostly attract spam, turning them off is often the better choice. Encourage discussion through email or social media instead.

What are pingbacks and should I allow them?

Pingbacks notify you when another blog links to your post. Today they’re mostly abused by spammers, so most sites should turn them off.

Final thoughts

Comments are a choice, not an obligation. If you want discussion, configure WordPress sensibly, use a layered anti-spam approach, close comments on older posts, moderate regularly and respond to readers. If you don’t have time to manage them, turn them off cleanly. Either way, clean up old spam and protect commenters’ privacy. Well-managed comments add value; neglected ones quietly undermine your site.