> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenarch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress

> WordPress pay-per-crawl plugin with AI bot detection — charge AI crawlers with USDC micropayments. Non-custodial Cloudflare pay-per-crawl alternative.

## Installation

Install the Xenarch plugin from the WordPress plugin directory, or upload the zip manually.

## Setup

1. Go to **Settings > Xenarch** in WordPress admin
2. Enter your site token (`st_...`)
3. Set your payout wallet address
4. Configure default pricing
5. Enable gating

## Features

### Bot detection

The plugin detects 135+ known AI bot signatures across 6 categories:

| Category      | Examples                       | Default |
| ------------- | ------------------------------ | ------- |
| AI Search     | Google AI, Perplexity, You.com | Gated   |
| AI Assistants | ChatGPT, Claude                | Gated   |
| AI Agents     | Custom agents, MCP clients     | Gated   |
| AI Training   | GPTBot, CCBot, Common Crawl    | Gated   |
| Scrapers      | Diffbot, Webz.io               | Gated   |
| General AI    | Other AI-identified bots       | Gated   |

Toggle categories on/off. Override individual bots.

### Pricing rules

Set path-specific pricing:

* Default price for all pages
* URL pattern overrides (e.g., `/premium/*` at \$0.01)
* Free paths (price = \$0)

### What passes through

* **Human visitors** — always pass through, zero impact
* **Search crawlers** (Google, Bing) — allowlisted by default
* **Social previews** (Twitter, LinkedIn) — allowlisted by default
* **Bots with valid tokens** — pass through after payment

### pay.json auto-generation

The plugin automatically serves `/.well-known/pay.json` based on your pricing configuration. No manual file creation needed.

### Bot logging

The plugin logs detected bots to the `wp_xenarch_bot_log` table:

* Signature, category, company
* First seen, last seen, hit count
* Auto-categorizes unknown bots

## How it works

1. Request comes in
2. Plugin checks: admin page? Logged-in user? Allowlisted path? → skip
3. Checks User-Agent against known bot signatures
4. If bot detected: checks category toggles and per-bot overrides
5. If gated: checks for valid `Authorization: Bearer` token
6. If no token: returns HTTP 402 with payment gate details
7. Agent pays USDC on Base, verifies, gets access token
8. Agent re-requests with token → content served

## Requirements

* WordPress 6.0+
* PHP 7.4+
* A Xenarch publisher account with registered site
