CMS Platforms
WordPress Installation
Add UCAPTCHA to your WordPress site in a few clicks using the WPCode plugin â no theme editing required.
Step 1 â Get your site key
Log in to your UCAPTCHA dashboard, go to My Sites, and copy the site key for your site.
Step 2 â Install WPCode
WPCode is a free WordPress plugin that lets you inject code snippets into your site's header without editing theme files.
- In your WordPress admin, go to Plugins â Add New
- Search for WPCode (by WPCode Team)
- Click Install Now, then Activate
âšī¸ Already using a different header/footer injection plugin like Insert Headers and Footers or Header Footer Code Manager? Those work fine too â skip this step and use your existing plugin.
Step 3 â Add the UCAPTCHA script
- Go to Code Snippets â Add Snippet in your WordPress admin
- Choose Add Your Custom Code (New Snippet)
- Give it a name like UCAPTCHA Widget
- Set the code type to HTML Snippet
- Paste the following code into the editor:
<script
src="https://www.ucaptcha.site/captcha-widget.js"
data-site-key="YOUR_SITE_KEY"
defer>
</script>- Under Insertion, set the location to Site Wide Header
- Toggle the snippet Active and click Save Snippet
Step 4 â Verify it's working
Visit any page on your WordPress site that has a contact or comment form. You should see the "I'm not a robot" checkbox appear automatically inside the form.
đĄ Using Contact Form 7, WPForms, or Gravity Forms? UCAPTCHA works with all of them automatically â no additional configuration needed.
Alternative: Edit your theme directly
If you prefer not to use a plugin, you can add the script tag directly to your theme's header.php file:
- Go to Appearance â Theme File Editor
- Select header.php from the file list on the right
- Paste the script tag just before the closing
</head>tag - Click Update File
âšī¸ Note: Editing theme files directly will lose your changes if you update the theme. Consider using a child theme or the WPCode method above for a more durable installation.