How to use recaptcha v2 on localhost?

Using the Google recaptcha version 2 for my wordpress, I added the "localhost" domain (I tried "" as well) on my google account side and I got keys but on my client-side I got this error :

ERROR: Invalid domain for site key

  • The owner email is the correct gmail email
  • The Site key was correct

Is there a way to test recaptcha (version 2) on Localhost (using virtualhosts) ?


I found this solution.

Using these keys below, you can do your tests on localhost, these keys are provided in the above link for testing purposes by google:

Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe

Google adds a message on recaptcha to prevent users and the administrator that keys are just for tests.

You can also put localhost and into your site admin. From the faqs:

localhost domains are no longer supported by default. If you wish to continue supporting them for development you can add them to the list of supported domains for your site key. Go to the admin console to update your list of supported domains. We advise to use a separate key for development and production and to not allow localhost on your production site key.

Need Your Help

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake

linux gcc 64-bit cmake 32-bit

Is it possible to compile a project in 32-bit with cmake and gcc on a 64-bit system? It probably is, but how do I do it?

How to Change the UISlider to Vertical?

objective-c ios xcode ipad uislider

I am customizing an UISlider for my app. I want the slider to be in vertical orientation, but the default UISlider is in horizontal orientation. I couldn't find how to change a UISlider's orientati...