TrollGuard logotype



TrollGuard is a free WordPress plugin that protects your blog from spam comments. It learns to filter out spam from your training. After a short while it has adapted to your personal blog and will accurately detect incoming spam.


  1. Please check that you are running WordPress 2.7 or higher. You can find the version number in the WordPress Dashboard.
  2. Download the plugin .zip file.
  3. Install and activate the plugin following the WordPress plugin install guide. Make sure the directory structure looks like this:
    Screenshot of the directory structure after installing the anti-spam plugin
  4. In WordPress Settings, click on the TrollGuard link:
    Screenshot of where to find the configuration link.
  5. Enter the uClassify read and write keys, you get them for free by signing up at
    Screenshot of where to enter the uClassify read and write keys.
  6. All setup done! As soon as you have trained it on 10 legitimate and 10 spam comments it will start to detect spam!


To be able to detect spam, TrollGuard first needs some assistance: You have to feed it with at least 10 legitimate and 10 spam comments. When a new comment is posted, you can tell TrollGuard if that comment is spam or legitimate in the Comments area. Click "Approve" for the legitimate comments and "Spam" for the rest as the screenshot shows below:
Screenshot showing where to click to classify a comment as spam or legitimate.

Since you probably don't want to wait for 10 new spam and legitimate comments to arrive before TrollGuard kicks in and start doing the spam detection, we have added a bulk training feature: If you already have approved and spam comments stored under the Comments area, you can use these for bulk-training TrollGuard. This is done under the "Training" section on the "TrollGuard config" page by clicking the "Train" button. Note that this button is only visible if there are approved or spam comments that TrollGuard has not yet been trained on. Before using the bulk train button, please note that it is important that all approved comments are legitimate and all spam comments really are spam. If spam and legitimate comments are mixed up, it will reduce the accuracy of TrollGuard's spam detection.
Screenshot showing where to click to bulk-train TrollGuard on existing comments.

When you have trained TrollGuard on 10 spam and 10 legimate comments, it will automatically detect spam when someone posts a new comment. If you want to check any remaining pending comments, you can so do by pressing the "Check pending for spam" button in the "Comments" area.


Please let us know if there's any problems installing or using the plugin. You can reach us at


To get notifications about future updates, please RSS feed icon subscribe to the updates feed.

About TrollGuard

TrollGuard is developed on top of uClassify's free text classification API. TrollGuard learns to filter spam as it's being used, and believe us - TrollGuard is a fast learner! It's being developed by Jon Kågström and Roger Karlsson.

Frequently Asked Questions

What languages does TrollGuard support?

TrollGuard has been tested with English, Spanish, French, German, Arabic, Portuguese, Russian Polish, Norwegian, Romanian, Lithuanian, Latvian, Swedish, Vietnamese, Ukrainian, Serbian, Slovenian, Slovak, Danish, Czech, Dutch, Bulgarian, Croatian, Catalan, Hebrew, Greek, Italian, Indonesian, Finnish and Filipino.

Chinese, Japanese and Korean are not supported.

Is the TrollGuard service free even if I use it on a commercial web site?


Will the TrollGuard service remain free?

Yes. Our goal is to fund the service by asking our users for donations and showing ads on this web page. If this revenue model fails we may introduce a small fee for commercial users.

What happens if the TrollGuard classification server is unavailable when a comment is posted?

If the classification server is unreachable TrollGuard is unable to determine if the comment is spam or legitimate. So TrollGuard will not do anything with the comment. To check pending comments for spam once the classification server is available again, press the "Check pending for spam" button in the Comments area.

Revision History

9 Jan 2011

Trollguard v0.9 released. New in this version:

27 Jan 2009

Trollguard v0.11 released. New in this version: Bulk training on existing legitimate and spam comments, new button to classify all pending comments and bug fixes.

12 Jan 2009

Trollguard is now available for everyone to download.

7 Jan 2009

TrollGuard is going live! We are giving away invites to those who wants to try our new anti-spam solution for Wordpress.