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.

  1. In your WordPress admin, go to Plugins → Add New
  2. Search for WPCode (by WPCode Team)
  3. 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

  1. Go to Code Snippets → Add Snippet in your WordPress admin
  2. Choose Add Your Custom Code (New Snippet)
  3. Give it a name like UCAPTCHA Widget
  4. Set the code type to HTML Snippet
  5. Paste the following code into the editor:
<script
  src="https://www.ucaptcha.site/captcha-widget.js"
  data-site-key="YOUR_SITE_KEY"
  defer>
</script>
  1. Under Insertion, set the location to Site Wide Header
  2. 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:

  1. Go to Appearance → Theme File Editor
  2. Select header.php from the file list on the right
  3. Paste the script tag just before the closing </head> tag
  4. 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.