Add Google reCAPTCHA to WordPress

How Can We Help?

Add Google reCAPTCHA to WordPress

You are here:
< Back to the Wiki

Do you have a WordPress server? Can users contact you via a form? Do you want to protect yourself from spam? Then let’s add a Google reCAPTCHA to your WordPress.

Prerequisites

  • A WordPress instance
  • A Google account

Setup reCAPTCHA

Go to the Google reCAPTCHA (google.com) page and click v4 Admin Console.
Click on the plus sign in the top right to create a new CAPTCHA.
Google will now present you with a form to get your CAPTCHA. Enter the details as follows:

  • Label: A friendly name for your CAPTCHA
  • reCAPTCHA type: select v3 if you want a score-based CAPTCHA, or select v2 if you want users to resolve a challenge
  • Domains: Enter the URL of your website where the CAPTCHA is for
  • Google Cloud Platform: A friendly name for your Project, or select one if available.

Click Submit. This will show the site key and the secret key, save these for later!

Add reCAPTCHA to WPForms

Do you have the WPForms Lite (wordpress.org) plugin?
Before we start, make sure to create a CAPTCHA.
Now let’s move to WordPress and navigate to WPForms – Settings – CAPTCHA. Select reCAPTCHA, and enter the details of the form as follows:

  • Type: Select the same type as you selected when creating the CAPTCHA, v2 or v3
  • Site Key: Enter the site key from the CAPTCHA
  • Secret Key: Enter the secret key from the CAPTCHA
  • Fail Message: Optionally, fill this with the message you want to show when the CAPTCHA fails
  • Score Threshold: Optionally, if a v3 CAPTCHA is chosen you can set a number between 0.0 and 1.0 which Google will use as a threshold to identify spam. 1.0 is likely a good interaction, and 0.0 is very likely a bot.
  • No-Conflict Mode: Set this to ON so no conflicts with other CAPTCHAs happen on your website.

Click Save Settings and you have yourself a CAPTCHA!

Add reCAPTCHA to Contact Form 7

Do you have the Contact Form 7 (wordpress.org) plugin?
Before we start, make sure to create a CAPTCHA.
Now let’s move to WordPress and navigate to Contact – Integration – reCAPTCHA. Select Setup Integration, and enter the details of the form as follows:

  • Site Key: Enter the site key from the CAPTCHA
  • Secret Key: Enter the secret key from the CAPTCHA

Click Save Settings and you have yourself a CAPTCHA!

2 Responses

  1. Louisa says:

    The post is very useful and well-researched. Thanks for sharing your expertise with us.

  2. Marianne says:

    I admire how your words reflects your individual personality. It feels like we’re engaging in a thoughtful conversation.

Leave a Reply to Marianne Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents