WordPress comments
If your site has comments on posts, pages or products, Shield can add its CAPTCHA widget and JavaScript check to the standard WordPress comment form. It stops bots posting comment spam before the comment is saved.
What it does
When the integration is on, Shield:
- Adds your CAPTCHA widget just above the comment form’s submit button.
- Adds the hidden JavaScript check (if you’ve turned the JavaScript presence check on).
- Checks both when the comment is submitted. If a check fails, the comment is rejected and never saved.
- Records the failure in the event log.
Before you start
- Choose and set up a CAPTCHA provider (see “Choose a CAPTCHA provider”). With no provider selected, and the JavaScript check off, there is nothing to check.
- Make sure Shield’s main protection switch is on.
- Check that your theme’s comment form is the standard WordPress one. Most themes are. See “Themes and plugins that change comments” below.
Turn it on
- Go to Settings → Login Shield → Integrations tab and find the Form plugin integration section.
- On the WP Comments tile, tick Enable.
- Click Save integration settings.
The tile always shows Installed, because comments are part of WordPress. The setting applies to every comment form on the site, including WooCommerce product reviews, which use the same form. There’s no per-post choice.
What visitors see
Visitors see the CAPTCHA widget just above the submit button. Depending on your provider, they tick a box, wait for a short check, or see nothing at all (invisible providers). The widget shows for everyone, including logged-in users and administrators.
If the check fails, the visitor lands on a plain WordPress error page titled Comment blocked, with a back link. The message is one of:
- “Security check failed. Please try again.”
- “Please complete the security check.”
- “JavaScript verification failed. Please enable JavaScript and try again.”
- “Security check expired. Please reload the page and try again.”
Pressing the browser’s Back button usually keeps what the visitor typed, but this depends on the browser.
What it doesn’t do
- It doesn’t read the comment text. It checks that the sender passed the CAPTCHA and JavaScript checks, not whether the content looks like spam. Keep using Akismet or another spam filter alongside it.
- It doesn’t affect comments you or other staff post from the dashboard, or comment replies sent by AJAX.
- Geo-blocking and lockouts do not apply to comments.
What gets logged
Failures appear in the Log tab as Captcha fail, with “WordPress Comments” and the reason in the Info column. These entries record the IP address but no username.
Themes and plugins that change comments
- Standard comment forms (the
comment_form()function) are covered. This includes most themes, and WooCommerce reviews. - Custom comment forms that don’t use
comment_form()won’t show the widget, but the server check still runs. Every comment on those forms will be rejected. Test before you leave this on. - Comment plugins that submit by AJAX (for example some discussion or comment-replacement plugins) are skipped by the check, so they are not protected by this setting.
- Trackbacks and pingbacks carry no CAPTCHA token, so with the integration on they are rejected. If you rely on them, test first.
- Comments created through the REST API don’t pass through this check. They are neither blocked nor protected by this setting.
Testing
- Open a post with comments open in a private window. The widget should appear above the submit button.
- Post a comment normally. It should be saved (or held for moderation, as usual).
- Post one without completing the widget, or with JavaScript off. It should show “Comment blocked”.
- Check the Log tab for a “Captcha fail” entry.
- Log in as an administrator and post a comment. The widget should appear and the comment should work.
Troubleshooting
- No widget on the comment form. Check that the WP Comments switch is on and saved, a CAPTCHA provider is selected and Shield’s main switch is on. Your theme may use a custom form. Clear page caches.
- Every comment is rejected. The widget isn’t rendering (custom form), your CAPTCHA keys don’t match the domain, or scripts are blocked or delayed. Turn the integration off while you investigate.
- “Security check expired” errors. The page was cached for longer than the security token lasts (24 hours by default). Shield refreshes it when JavaScript runs, so make sure scripts aren’t blocked or delayed. See “Caching and login pages”.
- Legitimate trackbacks stopped. See the note above. They don’t carry a token.
- Spam still arrives. A CAPTCHA reduces bot spam but doesn’t stop humans or bots that solve it. Use Akismet too.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!