WordPress Tweaks & Tuts?

Subscribe to TheCreatology via RSS | Email

Tutorial to add CAPTCHA in Contact Form 7 Plugin to block Spam on WordPress Blog

by Aky Joe

Spamming on WordPress blogs has become vital, just kidding, increasing day-by-day. You must be here looking up for solution to stop spam on your blog as well. To stop spam comments,  I have covered two articles on How to Block Spam using HTACCESS and using Akismet Plugin. But these tutorials will only help you to stop spam commenting on your blog but not on contact forms. For a spammer, it’s just a Submit button required to do all the action.

Spam MessageIf your WordPress Blog is using Contact Form 7 plugin, then beware that you can be spammer’s next target. Recently, I received few spam comments on my Email via Contact form 7 on thecreatology and it got worst with count of 50+. Annoying! Below is screenshot of the Inbox:

Spam Messages from Contact Form 7

Spam Messages from Contact Form 7

I tried tracking IP Address of all emails and the origin, but it was hard to block spammer access because they used a random IP Address every time. So, I had to install CAPTCHA in Contact Form 7 settings. In this tutorial, you will learn how to add CAPTCHA in Contact Form 7 Plugin to block Spam on Website.

Block Spam using CAPTCHA

CAPTCHA is an automated scripts made to validate forms submission. CAPTCHA reforms a word every time it refreshes. This makes it complex for spam bot to read CAPTCHA letters and auto submit form. To add CAPTCHA in WordPress Contact form, you will be required to install Really Simple CAPTCHA plugin. Below is stepwise procedure to add CAPTCHA in Contact form 7.

Step 1: Install Really Simple CAPTCHA Plugin

To install WordPress CAPTCHA plugin, login to WordPress dashboard:

  • Navigate to Dashboard > Plugins > Add new Plugin.
  • Search for Really Simple CAPTCHA plugin and click to install it. Refer to screenshot below.
install really simple captcha plugin

Install CAPTCHA plugin

  • One the plugin is installed, activate it.

Are done with installation of plugin? Move on to configure Contact Form 7.

Step 2: Add CAPTCHA to Contact Form 7

You can add CAPTCHA in contact form in few easy clicks. Follow the procedure below:

  • Login to WordPress Dashboard and navigate to Dashboard > Contact.
  • Select the contact form to edit it, refer to the screenshot below.
Select Contact Form To add CAPTCHA

Select Contact Form To add CAPTCHA

  • To add CAPTCHA, click on the Generate Tag drop down list on right, and select CAPTCHA option in the list, just like in the screenshot below:
Generate CAPTCHA Tag for Contact Form

Generate CAPTCHA Tag for Contact Form

  • After you click on the CAPTCHA option, CPATCHA setting options will appear under the Generate Tag drop down list. Now, configure the options and copy-paste the code on the left side of the window. Refer to screenshot below:
Add CAPTCHA to contact form code

Add CAPTCHA to contact form code

  • Once done, hit the Save button on top right and We’re Done! 😉

We’re Done

Now that you have added the code, refresh the contact form page and check it out, it will look similar to screenshot below:

CAPTCHA on WordPress Blog

Demo: CAPTCHA on WordPress Blog

Adding CAPTCHA will violate bots to submit spam on website. In a way you can focus more on blogging rather administering your blog.

In this article, we learned to add CAPTCHA in Contact Form 7 WordPress Plugin to block spam. If you have any queries or require any assistance, you can post a feedback using  comment form below.

Similar Topics: , ,

TheCreatology Support

Got a Query? We're ready, Just Say it!

If you have a doubt or a feedback, then get-in-touch with TheCreatology Support Team now.

Start a Hangout or Email Us

Are you looking for...

  • Logo Design
  • Web Development
  • Thesis Skin Design
  • Graphic Designing
  • Virtual Assistance
Hire Us!


{ read them below or add one }

shabooty August 19, 2011 at 4:30 am

thanks i needed that tutorial !


Glen Woodfin SEO September 11, 2011 at 11:50 am


Thanks so much for this tutorial. I used the Contact Form 7 on a website that was getting spammed to death. I’d been dreading figuring out how to solve the problem.

I did a search for: add a captcha code to contact form 7, and there you were.

Awesome Tutorial,


Aky September 11, 2011 at 1:10 pm

I am glad you liked it, I hope it was easy and effective. 😉


jondoe October 20, 2011 at 1:32 am

thx man, appreciate the info, got it working now !!!!


Paramveer December 7, 2011 at 12:56 pm

hi need to redirect the contact form page to thanks you page after submission

what i can do ..


Jenifer December 23, 2011 at 12:35 am

This is the best description I’ve seen, unfortunately it didn’t work for me 🙁 Any suggestions??


Martin January 17, 2012 at 11:10 pm

Really nice but still receiving spam any suggestion?


Aky January 24, 2012 at 1:36 pm

Well if the spam is still troubling you, then probably you should contact thecreatology support team. I am sure you will find a resolution with them. 😉


Natalya January 24, 2012 at 4:31 am

Unfortunately CAPTCHA on my screen is really light yellow. It is basically unreadable. I am trying to change the foreground color but nothing seems to work:

1. Changing “Foreground color” through “Contact Form 7” did not work.
2. $this->fg = array( 0, 0, 0 ); – changing this value did not do anything either.

Any other suggestions? Please help!


Pallavi May 18, 2012 at 11:49 am

I have added simple captcha but showing warning permissions denied to really-simple-captch.php


Aky Joe May 18, 2012 at 6:11 pm

Oh, that is a weird of an Error! I hope you followed above steps precisely? Also, it would be great if you can copy/paste the exact error code here (in your comment reply).


Krys November 12, 2012 at 3:03 am


Thanks very much!! Works like a charm!

Great tutorial



Chuck March 7, 2013 at 1:49 am

Thanks so much for this tutorial! Been looking all over for a way to add a simple CAPTCHA to Contact Form 7 .. good job.



Jim March 24, 2013 at 7:46 pm

Great tutorial – very easy to follow and implement! Thank you…


Jen April 11, 2013 at 1:17 am

Thanks for your tutorial. It was most helpful.
For those having problems with the captcha code not being visible, try making the foreground color black, 000000 or some other darker color. This helped me.


Stephen April 15, 2013 at 7:25 pm

Perfect – Just what I needed!!


Boston Appliance May 1, 2013 at 7:43 pm

Very useful to us, thank you. We are experimenting with a few different anti-spam measures for the contact forms on our site – have you had better luck with CAPTCHA, or the built-in quiz option in Contact Form 7? (Or both? Or something else?)


marco July 11, 2013 at 7:17 pm

i’ve some problem with captcha, i’ll try to explain, if i create the form without the captcha field and every things are right (all the control and message for missing filed are displayed correctly).
with captcha field, it doesn’t, if i click on submit with all the fields blanks, it seem to start to send anyway (all the field are compulsory).

i don’t receive any error message.
below the code of the form:
Il tuo nome (richiesto)
[text 1="your-name" language="*"][/text]

La tua email (richiesto)
[email* your-email]

[text 1="your-subject" language="*"][/text]

Il tuo messaggio
[textarea* your-message]

Inseririsci il codice di verifica:
[captchar captcha-686 4/4 ][captchac captcha-686 size:m]

[submit “Invia”]


Suresh Kumar July 22, 2013 at 2:20 am

I also use your contact form that is really very nice. Thanks!


Kilo November 3, 2013 at 12:43 pm

Completely useless guide how to use CAPTCHA, because the way how it is explained here – doesn’t matter if you will use it or not! The message could be sent without the verification letters!!!


Grace December 5, 2013 at 3:44 am

Thanks so much for this – I’ve been agonizing over the complicated guide on the Contact Form 7 homepage for about an hour. With your simple tutorial, I was able to get everything set up in just a moment. Really appreciate it.


Mary February 4, 2014 at 9:40 pm

Thank you so much! You saved me so much time googling ways to add Captcha to Contact Form 7.


Baruch April 2, 2014 at 2:31 pm

I used your very good Tutorila and added CAPCHA to my contact form 7.
I tried to do the same with my order form but it did not work. Is there any way to add CAPCHA to custom order form ?
Many thanks


Baruch April 2, 2014 at 3:14 pm

Thank you !!!
I just managed to to it also with my order form !!

You are the best !!!


Aky Joe April 16, 2014 at 6:59 am

Glad the recipe worked for you. 🙂


J Middya April 29, 2014 at 4:04 pm

After activating this plugin (Really Simple CAPTCHA Plugin), validation on Contact Form 7 stopped working. Please help.


Nidhi July 11, 2014 at 3:55 pm


Thank you for the tutorial, actually can we customize the captacha text to only small aplhabets

Thanks & Regards


Luke July 12, 2014 at 1:55 am

Follow this guide step by step but no captcha form shows up at all? Doesn’t seem to do anything, any ideas what i might be doing wrong?


M August 5, 2014 at 3:09 pm

Hi great tutorial. Having had a problem with the form I have been informed by my web host that many spam emails have passed through in the night and I have exceeded my limit. They now tell me that GD and FreeType PHP libraries are not supported? what am I to do? Any help appreciated.


Aky Joe August 6, 2014 at 1:57 am

Well, you got two options. [Option 1] is to change the hosting to a one supporting GD library. [Option 2] is to design a custom contact form and use a jQuery based Slider Captcha to fight spam.


June October 4, 2014 at 4:33 pm

Use WP-SpamShield they don’t need GD and FreeType PHP libraries.


Hopie August 9, 2014 at 10:21 am

Thank you for these very simple instructions. I too was getting spammed by my organizations website. I’m hoping this will resolve the issue. I will update to let you know, but instructions were perfect!


Rudi Nazar September 30, 2014 at 8:23 am

thank you so much this tutorial is really clear and concise brief


June October 4, 2014 at 4:31 pm

You guys can try WP-SpamShield Anti-Spam contact form…
Go to the WP-SpamShield option the option page is self explanatory

To add contact form use this

I have good success stopping spam comments with this.


fizzo October 7, 2014 at 3:24 pm

thank you so much!!


Yennicq October 26, 2014 at 3:57 pm

Very usefull, exactly what I was looking for, thank you!


Bryan Whatley October 29, 2014 at 10:52 pm

Thank you so much for the explanation and pictures! It really helped!
Bryan Lee Whatley


Khushboo November 28, 2014 at 2:45 pm

Captcha validation not working


Arunava January 16, 2015 at 12:55 am

Your explanation was truly very helpful. In 10 minutes it was all done.

Many thanks!


Mike February 6, 2015 at 9:13 am

Thanks for the clear and simple explanation! As a tech writer I appreciate your detail and step-by-step approach. So many others, too smart for me, make a simple task more complex by explaining processes in wordpress-developer-speak. Thanks for helping this non-expert out!


Jennifer February 25, 2015 at 11:42 pm

Hello, I added the contact form 7 to my website and I included the Solved Media Captcha inside the form. The form works and appears just fine, but people are still able to submit the form without actually having to solve the Solve Media Captcha. Any ideas on why this is?


Aky Joe February 26, 2015 at 12:13 pm

Can you provide URL of the contact form or the code used for “Media Captcha” used?


chittibabu March 9, 2016 at 8:08 pm

Thank you very much for your simple explanation but this not supporting case sensitive.
Is there any option to work with case sensitive or can we display the letter in small letters.

Please help me on this

Chittibabu M


Leave a Comment

Previous post:

Next post:

Contact Aky

Yes, I agree that all information above is valid.

Simple question, what's...