Google has an improved, user-friendly Captcha system.
Contact Form 7 is the most popular contact form plugin for WordPress.
By combining the two, you can easily create WordPress contact forms with antispam protection.
In this tutorial, I’m going show you how to integrate reCaptcha to Contact Form 7 in your WordPress site.
Step #1. Install the Contact Form 7 plugin
- Login to your WordPress site.
- Go to Plugins > Add new and search for “Contact Form 7”.
- Click “Install Now” and activate the plugin.
Step #2. Get the reCaptcha public and secret keys
You need to generate keys for your domain:
- Go to the Google reCaptcha site.
- Click the “Get reCAPTCHA” button.
- Enter your site details such as label, domain and email owner:
Step #3. Integrate reCaptcha with Contact Form 7
Inside your WordPress dashboard:
- Go to Contact > Integration
- Type Site key and Secret key. Use the ones you generated in Step 2.
- Save when you’re done.
Step #4. Edit the default contact form
By default, a form with basic fields is created during the installation process in step 1.
- Go to Contact > Contact forms > Your form
- Paste this shortcode to render the reCaptcha field just before the submit button:
- Click the “Save” button.
Step #5. Embed the contact form in a page
- Go to Contact > Contact forms.
- Copy the shortcode of the form.
- Go to Pages > Add new.
- Paste the shortcode.
- Publish the page.
Step #6. View the end result
- Preview the contact page to see how it looks: