Skip to content

WordPress Plugin

The WebDecoy WordPress plugin provides comprehensive bot protection for WordPress sites without writing any code. All detection and protection works locally — no API key or WebDecoy account required. It combines server-side detection, client-side JavaScript scanning, behavioral scoring, an invisible proof-of-work challenge, and form protection. Connecting to WebDecoy Cloud (optional) adds dashboard sync and cross-site actor intelligence.

FeatureDescription
Server-Side DetectionIP analysis, rate limiting, user-agent checking
Client-Side ScannerJavaScript-based bot and automation detection
Form ProtectionHoneypot fields for comments, login, registration
WooCommerce ProtectionCheckout velocity limiting, card testing detection
Good Bot HandlingAllowlist for search engines, social bots, AI crawlers
Local BlockingBlock IPs directly in WordPress
Invisible PoW ChallengeSuspicious visitors solve a proof-of-work page before proceeding
Statistics & ExportLocal statistics page with trends, CSV export of detections
Cloud Sync (optional)Sync detections to the WebDecoy dashboard with an API key
WordPress Request
┌─────────────────────────────┐
│ WebDecoy Plugin │
├─────────────────────────────┤
│ 1. IP Block Check │
│ 2. Rate Limit Check │
│ 3. Good Bot Check │
│ 4. Server-Side Analysis │
│ 5. Client-Side Scanner │
├─────────────────────────────┤
│ Decision: Allow/Block │
└─────────────────────────────┘
Detection → Stored locally + Synced to WebDecoy

  1. Download the Plugin

    • Go to https://cdn.webdecoy.com/wordpress/
    • Download the latest webdecoy-x.x.x.zip file
  2. Upload to WordPress

    • In WordPress Admin, go to Plugins → Add New
    • Click Upload Plugin
    • Choose the downloaded ZIP file
    • Click Install Now
  3. Activate

    • Click Activate Plugin
    • You’ll see “WebDecoy” in the admin menu
  1. Download and Extract

    Terminal window
    unzip webdecoy-x.x.x.zip
  2. Upload via FTP

    • Upload the webdecoy folder to /wp-content/plugins/
  3. Activate in WordPress

    • Go to Plugins in WordPress Admin
    • Find “WebDecoy” and click Activate

After activation:

  • “WebDecoy” menu appears in WordPress Admin
  • Status shows “Plugin Active”
  • Database tables are created automatically

  1. Click WebDecoy in the WordPress Admin menu
  2. Click Settings
  3. Configure options across multiple tabs
TabWhat it controls
Protection (default)Sensitivity, block threshold, rate limits, trusted-proxy settings
Good BotsSearch engine / AI crawler / monitoring allowances
BlockingLocal IP block list and block behavior
FormsHoneypot fields for comments, login, registration
ScannerClient-side detection script options
WooCommerceCheckout protection (shown when WooCommerce is active)
WebDecoy CloudOptional API key for dashboard sync

Behind Cloudflare or a proxy? Read this first

Section titled “Behind Cloudflare or a proxy? Read this first”

By default the plugin uses the direct connection IP and ignores forwarding headers like X-Forwarded-For and CF-Connecting-IP — spoofable headers are not trusted unless you say so. If your site is behind Cloudflare or another reverse proxy, every visitor will otherwise appear to come from the proxy’s IP:

  1. Go to Settings → Protection
  2. Enable “This site is behind Cloudflare” (or add your proxy’s CIDR ranges to Trusted proxies)
  3. Save — visitor IPs now resolve from the forwarding header only when the connection actually comes from a trusted proxy

Everything works without this. Connecting adds dashboard sync:

SettingDescription
API KeyYour WebDecoy API key (sk_live_...) from the dashboard’s API Keys page

Click Test Connection; status shows Active, Inactive, Connection Error, or “Not checked yet”. If cloud sync is off, the plugin keeps protecting your site locally — only the dashboard sync is affected.


Configure how the plugin detects and responds to threats.

SettingDefaultDescription
Enable ProtectionYesMaster on/off switch
SensitivityMediumDetection strictness
Minimum Score to Block75Score threshold for blocking
Rate Limit EnabledYesEnable request rate limiting
Requests Per Minute60Max requests before rate limit
LevelBehavior
LowMinimal detection, very few false positives
MediumBalanced detection and accuracy (recommended)
HighMaximum detection, may have false positives
ActionBehavior
BlockReturn 403 Forbidden
ChallengeShow CAPTCHA (if available)
Log OnlyRecord but don’t block

Configure which bots are allowed through without detection.

SettingDefaultDescription
Allow Search EnginesYesGooglebot, Bingbot, Yahoo, etc.
Allow Social Media BotsYesFacebook, Twitter, LinkedIn, Pinterest
Block AI CrawlersNoGPTBot, ClaudeBot, etc.
Custom AllowlistEmptyYour own bot user agents
  • Googlebot
  • Bingbot
  • Yahoo! Slurp
  • DuckDuckBot
  • Baiduspider
  • YandexBot
  • Facebook External Hit
  • Twitterbot
  • LinkedInBot
  • Pinterest
  • WhatsApp
  • Slackbot
  • GPTBot (OpenAI)
  • ClaudeBot (Anthropic)
  • Google-Extended
  • PerplexityBot
  • CCBot

Add your own bots (one per line):

MyInternalBot
PartnerCrawler
UptimeRobot

Protect WordPress forms from spam and automated submissions.

SettingDefaultDescription
Protect CommentsYesAdd honeypot to comment forms
Protect LoginYesDetect brute force on login
Protect RegistrationYesCatch fake registrations
Inject Honeypot FieldsYesAdd invisible trap fields
<!-- Automatically injected hidden field -->
<input type="text"
name="website_url"
style="position:absolute;left:-9999px;height:0;width:0;overflow:hidden"
tabindex="-1"
autocomplete="off">
ScenarioResult
Human submits (field empty)Submission allowed
Bot fills fieldDetected as bot, blocked
  • Tracks failed login attempts per IP
  • Temporary blocks after threshold
  • Detects credential stuffing patterns
  • Analyzes registration timing
  • Honeypot field validation
  • Email domain verification

If WooCommerce is installed, additional protection options appear.

SettingDefaultDescription
Checkout ProtectionYesEnable checkout monitoring
Max Checkouts Per Hour5Velocity limit per IP
Card Testing DetectionYesDetect rapid card attempts
Decline TrackingYesTrack payment failures

Detects patterns indicating card testing attacks:

PatternDetection
Multiple cards, same IPCard testing
Rapid checkout attemptsVelocity abuse
Many declines, one sessionCard stuffing
Small amounts, high volumeTesting pattern
IP: 192.168.1.100
Checkouts this hour: 5
Next checkout → BLOCKED (rate limit)
  • IPs exceeding checkout velocity
  • Sessions with suspicious patterns
  • Known fraudulent payment patterns

The plugin includes a JavaScript scanner that runs in visitors’ browsers.

SettingDefaultDescription
Enable ScannerYesLoad JavaScript scanner
Run on All PagesYesScanner on every page
Minimum Score to Report20Only report scores above this
Exclude Logged-In UsersNoSkip scanning for logged-in users
DetectionDescription
WebDriverSelenium, Puppeteer automation
Headless BrowserChrome Headless, PhantomJS
Browser AnomaliesInconsistent navigator properties
AI BotsGPTBot, ClaudeBot user agents

The scanner is enqueued automatically (public/js/webdecoy-scanner.js) with its configuration passed via a localized webdecoyScanner JavaScript object — there’s nothing to paste into your theme.

Use the Scanner tab’s options — e.g. Exclude logged-in users and the minimum-score-to-report threshold — to control what the scanner reports.


The WebDecoy dashboard widget shows:

  • Total detections (last 7 days)
  • Blocked IPs count
  • Recent high-risk detections
  • Quick links to settings

Navigate to WebDecoy → Detections to view:

ColumnDescription
Date/TimeWhen detection occurred
IP AddressVisitor’s IP
ScoreThreat score (0-100)
LevelMINIMAL, LOW, MEDIUM, HIGH, CRITICAL
SourceServer, Scanner, Form
ActionWhat action was taken

Filtering:

  • By date range
  • By threat level
  • By source type
  • By IP address

Navigate to WebDecoy → Blocked IPs to view:

ColumnDescription
IP AddressBlocked IP
ReasonWhy it was blocked
Blocked AtWhen block started
Expires AtWhen block ends
ActionsUnblock button

Managing Blocks:

  • Click Unblock to remove a block immediately
  • Expired blocks are automatically cleaned up
  • Manual blocks don’t expire unless configured
StorageData
Local (WordPress DB)All detections, for admin viewing
Cloud (WebDecoy)Synced for dashboard analytics

Causes:

  • Invalid API key
  • Network connectivity issues
  • API key expired or revoked

Solutions:

  1. Verify API key is correct
  2. Check for typos (no extra spaces)
  3. Generate a new API key if needed
  4. Check server can reach ingest.webdecoy.com

Causes:

  • JavaScript errors on page
  • Caching plugin conflict
  • Theme blocking scripts

Solutions:

  1. Check browser console for errors
  2. Clear all caches (page, browser, CDN)
  3. Exclude scanner from optimization plugins
  4. Verify scanner is enabled in settings

Causes:

  • Sensitivity too high
  • Score threshold too low
  • Blocking legitimate bots

Solutions:

  1. Lower sensitivity to “Medium” or “Low”
  2. Increase minimum score to block (try 80)
  3. Add legitimate bots to allowlist
  4. Enable “Log Only” mode temporarily

Causes:

  • Checkout velocity too strict
  • Interfering with payment plugins

Solutions:

  1. Increase max checkouts per hour
  2. Disable checkout protection temporarily
  3. Check for plugin conflicts
  4. Add payment gateway IPs to allowlist

Causes:

  • CDN cache
  • WordPress update check timing

Solutions:

  1. Go to Plugins → WebDecoy
  2. Click Check for updates
  3. Or wait for automatic check (every 12 hours)

Enable debug logging:

  1. Add to wp-config.php:

    define('WEBDECOY_DEBUG', true);
  2. Logs are written to:

    /wp-content/debug.log
  3. Look for entries starting with [WebDecoy]

If issues persist:

  1. Check plugin version is latest
  2. Gather debug logs
  3. Contact [email protected]