Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Add a CAPTCHA to Your WordPress Site

This guide shows you how to add a CAPTCHA to your WordPress login, comment and contact forms so robots cannot fill them in.

SSL and Security2 min read18 steps4 screenshots

What is a CAPTCHA?

A CAPTCHA is a small test that tells people from robots. It may be a tick box that says "I am not a robot", or a picture puzzle. Robots often send fake comments and try to guess passwords. A CAPTCHA stops many of them. WordPress is a popular tool for building websites.

What you need

Google reCAPTCHA is a free CAPTCHA service. You need two keys from it. A key is a long code that links your site to the service. One is the site key and the other is the secret key. Keep the secret key private. Other services, such as hCaptcha or Cloudflare Turnstile, work in a very similar way.

CAPTCHA 1

Step 1: Get your keys

  1. Sign in with a Google account on the reCAPTCHA admin page.
  2. Click the button to register a new site.
  3. Enter a label, such as your site name.
  4. Choose the type. reCAPTCHA v2 with the tick box is simple for beginners.
  5. Add your domain name.
  6. Submit the form and copy the site key and the secret key.

Step 2: Install a plugin

A plugin is an add-on that gives WordPress new features.

  1. Log in to your WordPress dashboard.
  2. Go to Plugins, then Add New.
    CAPTCHA 2
  3. In the search box, type "CAPTCHA" or "reCAPTCHA".
  4. Choose a plugin that is popular and updated recently.
  5. Click Install Now, then Activate.

Step 3: Add your keys

  1. Open the settings page of the plugin. Look under Settings or in its own menu item.
  2. Paste the site key and the secret key in the right boxes.
  3. Tick the places where you want the CAPTCHA, such as login, registration, comments and lost password.
  4. Click Save Changes.

Step 4: Test it

  1. Open a private browser window.
    CAPTCHA 3
  2. Go to your login page or comment form.
  3. Check that the CAPTCHA shows and works.
Tip: If you use a contact form plugin, it often has its own reCAPTCHA setting. Look in the form plugin's settings.

Quick recap

  • A CAPTCHA blocks robots with a small test.
  • Get a site key and a secret key from the CAPTCHA service.
    CAPTCHA 4
  • Install a plugin and paste the keys.
  • Choose the forms to protect and test them.