# TidyConsent: install and configure (for AI assistants and scripts)

Steps a coding agent or script can follow on a WordPress site. Everything here is how the product works today. Where a step needs a person, it says so.

## Facts

| | |
|---|---|
| Name | TidyConsent |
| Plugin slug and folder | `tidy-consent` |
| Requires | WordPress 6.0+, PHP 7.4+ |
| Free plugin | $0, complete, GPLv2 or later |
| Pro, 1 site | $49 per year (USD) |
| Pro, 5 sites | $99 per year (USD) |
| Settings screen | Settings → TidyConsent |
| Options row | `tidyconsent_options` |

## 1. Install the free plugin

**With WP-CLI, from the WordPress.org directory:**

```
wp plugin install tidy-consent --activate
```

If WP-CLI answers that the plugin could not be found, it is not in the directory yet. Use the ZIP route.

**From the ZIP:**

The ZIP is sent by emailed link: a person enters their address at https://tidyconsent.com/#get and opens the link in the message. An agent cannot do this step, because it cannot receive email. Ask the site owner for the file, then:

```
wp plugin install /path/to/tidy-consent.zip --activate
```

Without WP-CLI: Plugins → Add New → Upload Plugin, then Activate.

## 2. What happens on activation

- The banner is on at once, for every visitor, with Accept all, Reject all and Preferences.
- Known tracking tools on the page are held back until a visitor allows their category. Google Consent Mode v2 signals start as denied.
- Nothing is sent to any outside service. That only happens when an administrator presses Run scan (or runs `wp tidyconsent scan`), or asks for the consent checklist by email on the settings screen.

Check it:

```
wp plugin is-active tidy-consent && echo active
wp tidyconsent status
```

Then load the home page in a private window: the banner should appear.

## 3. What "configured" means

A site is configured when all three are true:

1. **The banner is on.** `enabled` is `1` (the default). `wp tidyconsent banner enable` sets it.
2. **The categories match the site.** Run the scan, read the proposal, then apply it. This sets which optional categories (functional, analytics, marketing) the banner offers. Applying is a separate step on purpose; a scan alone changes nothing.

   ```
   wp tidyconsent scan            # stores a proposal and prints it; changes nothing
   wp tidyconsent apply-scan      # applies it (same as the Apply button)
   ```

   In the admin: Settings → TidyConsent → **Run scan**, then **Apply proposed configuration**. The scan sends the site's home address to the TidyConsent service; it needs the site to be reachable from the internet. The service allows a few scans a minute per address; if it asks you to wait, the command says how long.
3. **A cookie policy page exists.** Settings → TidyConsent creates a draft from the tools found on the site. A person must read it and publish it: it has to describe the site truthfully. There is no WP-CLI command for this step on purpose.

Tell the site owner what the scan found and what was applied: they are responsible for the setup.

## 4. Settings and defaults

Stored in the `tidyconsent_options` row. Change them on the settings screen or with `wp tidyconsent settings set <key> <value>`; both check every value, and an invalid value is refused with the allowed values listed. Do not write the option row directly.

```
wp tidyconsent settings list                 # every setting this command can change, with its value
wp tidyconsent settings get layout
wp tidyconsent settings set layout bar
wp tidyconsent settings set accent_color '#0f766e'
```

| Key | Default | Values |
|---|---|---|
| `enabled` | `1` | `0`, `1` |
| `layout` | `box-left` | `bar`, `box-left`, `box-right`, `modal` |
| `theme` | `light` | `light`, `dark`, `auto`, `site`, `custom` |
| `accent_color` | `#111827` | hex colour |
| `corners` | `rounded` | `square`, `rounded`, `pill` |
| `font` | `system` | `site`, `system` |
| `animation` | `slide` | `slide`, `fade`, `none` |
| `delay_seconds` | `0` | 0 to 30 |
| `consent_days` | `182` | 30 to 395 |
| `show_reopen_link` | `1` | `0`, `1` |
| `geo_mode` | `all` | `all` (reserved; has no effect) |
| `honour_gpc` | `1` | `0`, `1` (sites installed before this setting existed have `0` until changed) |
| `hold_embeds` | `1` | `0`, `1`: YouTube, Vimeo, Google Maps and similar embeds show a click-to-load placeholder until consent (sites installed before this setting existed have `0` until changed) |
| `region_mode` | `off` | `off` (opt-in banner for everyone), `cdn` (opt-out notice outside the EEA, UK and Switzerland, from a CDN country header) |
| `style_tweaks` | (none) | comma-separated list of `bigger_text`, `soft_glow`, `outline`, `glass`, `capital_title`, `roomier`, `chunky_buttons`, or `none`. Ready-made style tweaks; there is no free-form CSS setting |
| `banner_title` | `Your privacy, your choice` | text |
| `accept_label` / `reject_label` / `preferences_label` | `Accept all` / `Reject all` / `Preferences` | text |

Clear the site's page cache after changing settings, so visitors get the new banner.

For theme and plugin code on the site:

```js
TidyConsent.hasConsent('analytics')            // true or false
document.addEventListener('tidyconsent:change', handler)
```

Shortcode for a "change my choice" link: `[tidyconsent_preferences]`.

## 5. Other WP-CLI commands

| Command | What it does |
|---|---|
| `wp tidyconsent status [--format=json]` | Banner on or off, categories offered, tools found, last scan, consent log size |
| `wp tidyconsent log export [--from=YYYY-MM-DD] [--to=YYYY-MM-DD]` | The consent log as CSV on standard output |
| `wp tidyconsent banner disable` | Turns the banner off. Known trackers then load for every visitor without asking |
| `wp help tidyconsent` | Every command, with its options |

The commands exist only when WP-CLI runs them; they add nothing to normal page loads.

## 6. Pro

1. A person buys at https://api.tidyconsent.com/checkout?plan=single ($49 per year, 1 site) or https://api.tidyconsent.com/checkout?plan=five ($99 per year, 5 sites). The license key is shown when payment completes and sent by email.
2. Download the add-on with the key, and install it. The free plugin must be active.

```
curl -fL -o tidy-consent-pro.zip "https://api.tidyconsent.com/pro/download?license_key=YOUR-KEY"
wp plugin install tidy-consent-pro.zip --activate
```

3. Activate the key under Settings → TidyConsent Pro. This is a press in the WordPress admin: the add-on stores the key and registers the site.

The service endpoints the add-on uses (JSON, `POST`, at `https://api.tidyconsent.com`):

| Endpoint | Body | Purpose |
|---|---|---|
| `/licenses/activate` | `license_key`, `site_url` | Give this site a seat |
| `/licenses/validate` | `license_key`, `site_url` | Is the license active for this site |
| `/licenses/deactivate` | `license_key`, `site_url` | Release a seat |

A key is a secret. Do not write it into a repository, a log or a chat.

## 7. Limits to tell the site owner

- The blocker knows 196 tools; https://tidyconsent.com/llms.txt names the most common. It does not block tools it does not know, and can miss one that a performance plugin merged into a combined file.
- TidyConsent does not implement the IAB Transparency and Consent Framework (TCF). A site whose ad network or programmatic ad auctions require TCF consent signals needs a TCF-registered consent management platform instead.
- TidyConsent is not legal advice and does not certify that a site complies with GDPR, CCPA or any other law.
