How to Add Captcha to Your WordPress Site

It is highly likely that you have already come across some kind of captchas when trying to leave a comment, register an account, or complete a purchase on a website. Despite being somewhat annoying, captchas help us prevent spammers, bots, and automated programs from infiltrating our website.

If you always wanted to add a captcha to your WordPress site, you have come to the right place. In this post, I will show you how to do that by using two of the most popular plugins, which are –

  1. Better WordPress reCAPTCHA (with no CAPTCHA reCAPTCHA) and
  2. Google Captcha (reCAPTCHA) by BestWebSoft

Let’s get started with Google Captcha.

Using Google Captcha to Add Captcha

As you can guess, the first step is to install and activate the Google Captcha plugin on your website. This will add a new menu item titled “Google Captcha” to your dashboard menu.

Go to Google Captcha > Settings to configure the plugins options. This takes you to a page like the following –

The first section is titled “Authentication.” This is where you have to provide the Site and Secret Keys. You can generate these keys for free by using your Google account. You just need to visit the reCAPTCHA settings page and register your site. Make sure that you have chosen “reCAPTCHA V2” as the captcha type.

You will find the Site and Secret Keys in the “Adding reCAPTCHA to your site” section –

Copy both of these keys and paste them into the appropriate fields on your website.

Next, move on to the “General” section. Here, the first option enables you to choose where to enable reCAPTCHA. The free plugin allows you to choose the login, registration, password reset, and comment forms. You can purchase the premium version to use Captcha in other places as well.

Then, you will find the option to hide reCAPTCHA for various user roles. Choose the roles for which you don’t want to display the Captcha challenges. “Whitelist Notification” allows you to provide a custom notification when the Captcha is not displayed.

The next two options enable you to choose the reCAPTCHA version and theme. There are multiple themes available depending on your selected version.

Lastly, “Disabled Submit Button” allows you to disable the submit button until the Captcha is loaded.

Once you have made all the changes, click “Save Changes” to save and apply these changes.

Setting up Other Options

There are some other configuration options available for you. First of all, let’s check out the “Misc” options.

You will find an option to allow the plugin to track your usage details and share the data anonymously with the developers. There is also a “Restore Settings” option to get back to the original plugin settings.

“Custom Code” enables you to apply your own CSS code to override the plugin style. Before you write any code, make sure the “Activate custom CSS code” box is checked. It is also possible to apply custom JavaScript code by using the next option.

Now that you have set up the plugin, you can check out the Captchas displayed on the login or comment forms by opening an incognito window of your browser.

Using Better WordPress reCAPTCHA

Once again, the first step is to install and activate the Better WordPress reCAPTCHA plugin on your website. This will create a new menu item titled “BWP reCAPT” in your dashboard menu.

Go to BWP reCAPT > General Options to set up the plugin options. This will take you to a page like the following –

Similar to the previous plugin, you will need the Site and Secret Keys to use the plugin. The process is exactly similar as I showed you earlier – you visit the reCAPTCHA settings page, register your site, and get the keys from the “Adding reCAPTCHA to your site” section.

Once you have got the keys, get back to your website and provide the keys in the “reCAPTCHA API Keys” section. Leave the “reCAPTCHA Settings” options as they are.

Then, move on to the “Main Functionality” section. Here, you can choose to enable captcha for the comment, registration, and login forms. The next options will enable you to hide the captcha for registered users, visitors who have a specific number of approved comments, and the users who can manage options.

In the “reCAPTCHA for comment form” section, you can define the captcha position, action for the invalid captcha response, enable auto-fill for the comment field, and provide the wrong captcha message.

Then, you will find two separate sections to set up CAPTCHA integration for Akismet and Contact Form 7. Once you have made the necessary changes, click “Save Changes” to apply these changes.

Setting up the Theme Options

Better WordPress reCAPTCHA comes with two captcha themes – dark and light. You can choose any of these in the “reCAPTCHA theme” option. The next option allows you to choose the normal or compact size for the captchas.

It is possible to use custom CSS to change the default captcha styling. You can do that by checking the “Enable custom CSS” box and providing the CSS code in the following text area. You will also find an option to define the language or auto-detect the language.

You can check out a preview of the captcha code in the “Preview your reCAPTCHA” section at the bottom of the page.

Once you have made the necessary style changes, click “Save Changes” to apply the new settings.

Final Words

Using captcha is a great way to fight back spammers, bots, and automated scripts from abusing your website. Now that you have read this in-depth tutorial, you know which the best plugins are to add captcha to your WordPress site.

So, which of these plugins will you use on your website? Or maybe you are already using another captcha plugin. Whichever it is, let me know the name of your preferred plugin in the comments below.

Leave a Reply