Title: Selfcap – Self-Hosted Captcha
Author: christianoerick
Published: <strong>18 november 2026</strong>
Last modified: 18 november 2026

---

Sök tillägg

![](https://ps.w.org/selfcap/assets/banner-772x250.png?rev=3808425)

![](https://ps.w.org/selfcap/assets/icon.svg?rev=3808425)

# Selfcap – Self-Hosted Captcha

 Av [christianoerick](https://profiles.wordpress.org/christianoerick/)

[Ladda ner](https://downloads.wordpress.org/plugin/selfcap.1.0.3.zip)

 * [Detaljer](https://sv.wordpress.org/plugins/selfcap/#description)
 * [Recensioner](https://sv.wordpress.org/plugins/selfcap/#reviews)
 *  [Installation](https://sv.wordpress.org/plugins/selfcap/#installation)
 * [Utveckling](https://sv.wordpress.org/plugins/selfcap/#developers)

 [Support](https://wordpress.org/support/plugin/selfcap/)

## Beskrivning

Selfcap protects your forms with a simple ”I’m not a robot” checkbox. Everything
happens on your own site: WordPress issues the challenge, checks the answer, keeps
the log and blocks attackers. Nothing is sent to another company, and there is nothing
to sign up for.

**How it protects**

 * **Proof-of-work.** The visitor’s browser solves a small computation in the background.
   People do not notice it; bots sending thousands of requests pay for every one.
 * **Browser signals.** Automated browsers, scripted clicks and fake user agents
   are refused.
 * **One-time tokens.** Each solved captcha is good for a single form submission
   from the same address, and expires in 5 minutes. Tokens solved elsewhere are 
   refused.
 * **Rate limit and adaptive difficulty.** The more an address asks, the harder 
   each challenge gets.
 * **Automatic blocking.** Addresses that behave like an attack are blocked temporarily(
   15 minutes, then 1 hour, then 24 hours). A customer who fails a few times is 
   never blocked, nor are the people sharing their address.
 * **No side doors.** Login over XML-RPC is closed, and the WordPress and WooCommerce
   forms share one setting, so neither is a way around the other.

**Forms**

 * Login, registration, lost password and comments, on wp-login.php, WooCommerce
   My Account and multisite sign-up
 * WooCommerce checkout, in both the block checkout and the classic one, plus the
   Pay for order page
 * Contact Form 7, with the `[selfcap]` tag
 * Any other form, with the `[selfcap]` shortcode and `selfcap_verify()`

**Dashboard**

 * Totals and a daily chart for the last 7, 30 or 90 days
 * Verification log with result, score, reason, IP address and browser
 * IP rules: block or allow an address or a CIDR range, permanently or for a while
 * Real visitor IP behind Cloudflare, a load balancer or your own proxy

**Languages**

The widget speaks 15 languages: English, Spanish, Portuguese, German, French, Italian,
Dutch, Japanese, Chinese, Russian, Polish, Indonesian, Turkish, Persian (right to
left) and Swedish. It follows the visitor’s browser, or a language you choose. The
admin screen and the messages are translated on translate.wordpress.org: WordPress
installs the translation for your site language automatically, and you can force
any of those languages in the settings once its translation is available.

**Privacy**

This plugin does not contact any external service. It stores, on your own database
and for a limited time (30 days by default), the IP address, browser user agent 
and result of each verification. A suggested paragraph for your privacy policy is
added under Settings > Privacy.

## Skärmdumpar

[⌊Overview: totals, daily chart and verification log.⌉⌊Overview: totals, daily chart
and verification log.⌉[

Overview: totals, daily chart and verification log.

[⌊The widget above the "Place order" button of the WooCommerce checkout.⌉⌊The widget
above the "Place order" button of the WooCommerce checkout.⌉[

The widget above the ”Place order” button of the WooCommerce checkout.

[⌊IP rules, manual and automatic.⌉⌊IP rules, manual and automatic.⌉[

IP rules, manual and automatic.

[⌊Settings.⌉⌊Settings.⌉[

Settings.

[⌊The widget on the login screen.⌉⌊The widget on the login screen.⌉[

The widget on the login screen.

## Installation

 1. Upload the plugin to `/wp-content/plugins/` or install it from the Plugins screen.
 2. Activate it. Login, registration, lost password and comments are protected right
    away.
 3. Open **Selfcap > Settings** to choose which forms to protect, including WooCommerce
    and Contact Form 7 when those plugins are active.

For Contact Form 7, add the `[selfcap]` tag to the form.

## Vanliga frågor

### Does it send any data to a third party?

No. The challenge, the validation, the log and the blocking all run on your own 
site.

### I am locked out of the login. What now?

Add `define('SELFCAP_DISABLE', true);` to `wp-config.php`. That switches the captcha
off until you remove the line.

### Does it work with page caching?

Yes. The widget fetches its challenge after the page loads, so cached pages are 
fine.

### Does it need the REST API?

Yes. The widget talks to `/wp-json/selfcap/v1/` on your own site. If a security 
plugin closes the REST API to visitors, leave that route open.

### My site is behind Cloudflare or a load balancer. Will it see the right IP?

Yes. Forwarding headers are read only when the connection comes from Cloudflare,
a private address or a proxy you list in the settings, so a visitor cannot forge
them. The settings screen shows the address detected for you.

### Can a determined bot get through?

Browser signals can be forged by a dedicated bot. The real cost comes from the proof-
of-work, the rate limit, the one-time tokens and the automatic blocking, which make
large-scale abuse expensive.

### How do I protect a custom form?

Print the widget with `echo do_shortcode('[selfcap]');` inside the form and call`
selfcap_verify()` in the code that handles the submission. It returns true or false.

### Does it work with express payment buttons (Apple Pay, Google Pay)?

Those buttons place the order without showing the checkout form, so with the WooCommerce
checkout protected they are refused until the visitor ticks the box. Test them on
your store, and turn the checkout option off if you rely on them.

### I use the WordPress mobile app.

The app logs in over XML-RPC, which this plugin closes by default because attackers
use it to get around the login captcha. Turn off ”Block logins over XML-RPC” in 
the settings.

### Can I change the thresholds?

Yes, with the `selfcap_config` filter (timeouts, rate limit, blocking thresholds).
Extra hostnames for the same site can be added with the `selfcap_hostnames` filter.

### Where is the source of the widget?

The readable source of `assets/widget.js` is in `assets/src/`. It is bundled with
esbuild.

## Recensioner

Detta tillägg har inga recensioner.

## Bidragsgivare och utvecklare

”Selfcap – Self-Hosted Captcha” är programvara med öppen källkod. Följande personer
har bidragit till detta tillägg.

Bidragande personer

 *   [ christianoerick ](https://profiles.wordpress.org/christianoerick/)

”Selfcap – Self-Hosted Captcha” har översatts till 5 språk. Tack till [översättarna](https://translate.wordpress.org/projects/wp-plugins/selfcap/contributors)
för deras bidrag.

[Översätt ”Selfcap – Self-Hosted Captcha” till ditt språk.](https://translate.wordpress.org/projects/wp-plugins/selfcap)

### Intresserad av programutveckling?

[Läs programkoden](https://plugins.trac.wordpress.org/browser/selfcap/), kika på
[SVN-filförvaret](https://plugins.svn.wordpress.org/selfcap/) eller prenumerera 
på [utvecklarloggen](https://plugins.trac.wordpress.org/log/selfcap/) via [RSS](https://plugins.trac.wordpress.org/log/selfcap/?limit=100&mode=stop_on_copy&format=rss).

## Ändringslogg

#### 1.0.3

 * The widget speaks 15 languages: German, French, Italian, Dutch, Japanese, Chinese,
   Russian, Polish, Indonesian, Turkish, Persian (right to left) and Swedish join
   English, Spanish and Portuguese.
 * The widget and plugin language settings list all of them.

#### 1.0.2

 * Translations of the admin screen now come from translate.wordpress.org (language
   packs); the plugin no longer ships its own .po/.mo files in the directory package.

#### 1.0.1

 * Position of the widget on the WooCommerce checkout: above the Place order button(
   follows the button when the theme moves it), before or after payment, before 
   or after billing, or before any element by CSS selector.
 * Widget alignment: left, center or right, in a full-width row.
 * Themes that print the checkout widget twice end up with a single one.

#### 1.0.0

 * First release.

## Meta

 *  Version **1.0.3**
 *  Senast uppdaterat **1 dag sedan**
 *  Aktiva installationer **Färre än 10**
 *  WordPress-version ** 6.3 eller senare **
 *  Testat upp till **7.1.5**
 *  PHP-version ** 7.4 eller senare **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/selfcap/), [Polish](https://pl.wordpress.org/plugins/selfcap/),
   [Russian](https://ru.wordpress.org/plugins/selfcap/), [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/selfcap/),
   [Swedish](https://sv.wordpress.org/plugins/selfcap/) och [Turkish](https://tr.wordpress.org/plugins/selfcap/).
 *  [Översätt till ditt språk](https://translate.wordpress.org/projects/wp-plugins/selfcap)
 * Etiketter
 * [anti-spam](https://sv.wordpress.org/plugins/tags/anti-spam/)[captcha](https://sv.wordpress.org/plugins/tags/captcha/)
   [security](https://sv.wordpress.org/plugins/tags/security/)[spam](https://sv.wordpress.org/plugins/tags/spam/)
   [woocommerce](https://sv.wordpress.org/plugins/tags/woocommerce/)
 *  [Avancerad vy](https://sv.wordpress.org/plugins/selfcap/advanced/)

## Betyg

Än så länge har inga recensioner skickats in.

[Your review](https://wordpress.org/support/plugin/selfcap/reviews/#new-post)

[Visa alla recensioner](https://wordpress.org/support/plugin/selfcap/reviews/)

## Bidragande personer

 *   [ christianoerick ](https://profiles.wordpress.org/christianoerick/)

## Support

Har du något att säga? Behöver du hjälp?

 [Visa supportforum](https://wordpress.org/support/plugin/selfcap/)