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

# WordPress plugin installation

> Install RankRaft AI Analytics, connect it with your site key and confirm data is arriving.

<Steps>
  <Step title="Get your site key">
    In RankRaft AI, open **Integrations**, choose **WordPress plugin** and click **Create site key**. Copy the key.
  </Step>

  <Step title="Download the plugin">
    On the same page, click **Download RankRaft AI plugin (.zip)**.
  </Step>

  <Step title="Install and activate">
    In your WordPress admin, go to **Plugins → Add New Plugin → Upload Plugin**, choose the zip, click **Install Now**, then **Activate**.

    You can also upload the `rankraft-ai-analytics` folder to `/wp-content/plugins/` and activate it from **Plugins**.
  </Step>

  <Step title="Connect">
    Go to **Settings → RankRaft AI**, paste your key and click **Test connection**.

    You should see **Connected to *your site***. The key is saved and request logging switches on by itself.
  </Step>

  <Step title="Check it's working">
    Click **Send test event**. Within a minute a row named **RankRaft-Test** appears in your RankRaft AI **Request log**, and the status at the top of **Integrations** turns to **Connected**.
  </Step>
</Steps>

<Warning>
  Using a page cache or CDN? Pages it serves never reach WordPress, so bots reading them aren't counted. Read [CDN and page caching](/agent-analytics/wordpress/caching) next.
</Warning>

## Store the key in wp-config.php (recommended)

For production sites, define the key in `wp-config.php`. It overrides the value saved in the database and is never shown in the admin UI:

```php wp-config.php theme={"system"}
define( 'RANKRAFT_SITE_KEY', 'rr_live_your_key_here' );
```

The settings page then shows *Set via RANKRAFT\_SITE\_KEY in wp-config.php*.

## Settings reference

The settings page has three tabs.

### General

| Setting | Default | Description |
| - | - | - |
| Enable request logging | Off until a successful test | Untick to stop logging at any time. |
| Let AI and search crawlers bypass the page cache | On | Writes rules to `.htaccess` so crawler requests skip WordPress page caches. See [caching](/agent-analytics/wordpress/caching). |
| Site key | — | Paste a key and click **Test connection**. Leave blank to keep the current key. |

### Privacy

| Setting | Description |
| - | - |
| Also never log these paths | One pattern per line. `*` matches anything; start with `/` to match from the beginning of the path. |
| Keep settings and queued logs when the plugin is deleted | Off by default, so uninstalling removes everything. |

### Status

Shows logging state, the masked site key, your RankRaft AI account state (**Active**, **Paused**, **Site removed** or **Attention**), queued logs, oldest queued row, last send, last error and next scheduled send. It also has **Test connection**, **Send test event** and the cache-bypass check.

## Multisite

Each site in a network is configured separately, with its own RankRaft AI site and key.

## Uninstall

Deactivate the plugin first. Deactivation removes the plugin's `.htaccess` rules. Deleting the plugin then removes its settings and queue, unless you ticked **Keep settings and queued logs**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.