---
title: WordPress plugin
description: Serve posts, pages and WooCommerce products as markdown from your WordPress site. The plugin is GPL-2.0-or-later; Console reporting is optional.
canonical_url: https://rebilder.com/docs/adapters/wordpress
last_updated: "2026-09-28"
---

# [WordPress plugin](https://rebilder.com/docs/adapters/wordpress)

> Serve posts, pages and WooCommerce products as markdown from your WordPress site. The plugin is GPL-2.0-or-later; Console reporting is optional.

- **Updated:** 2026-09-28
- **Author:** Rebilder
- **Section:** Adapters
- **Description:** Serve posts, pages and WooCommerce products as markdown from your WordPress site. The plugin is GPL-2.0-or-later; Console reporting is optional.
- **Publisher:** Rebilder

## What it does

When a request for one of your pages carries `Accept: text/markdown`, the plugin answers with that page’s content as markdown instead of HTML. Same URL, same substance, different format. There is nothing to configure: activate it and it works. Connecting it to a Console is optional and separate. See below.

| Request | Response |
| --- | --- |
| A browser, or anything human-shaped | Untouched. WordPress renders the page. |
| Googlebot or bingbot, **even asking for markdown** | The canonical HTML. Always. |
| `Accept: text/markdown` | That page’s content as markdown, at the same URL |
| A known agent (ChatGPT-User, ClaudeBot, …) | Markdown |
| An unidentified agent that did not ask | HTML, because we never guess a format |
| `GET /llms.txt` | An index of your content |
| `GET /answers` (only after an import) | Your imported Q&A set: markdown for agents, HTML for people, FAQ data for both |

Posts and pages render with their title, publication and update dates, author, categories and tags, and the body. WooCommerce products render with name, price, availability, stock, SKU, categories and attributes.

The plugin uses `/answers` only after you import answers. If a published page already lives at that address, Settings → Rebilder names it so you can change its slug first. Deactivating the plugin removes `/llms.txt` and `/answers` from the next request, on every site it was active on.

## Install

Download the [WordPress plugin ZIP](/downloads/rebilder-wordpress-0.4.1.zip), then open Plugins → Add New → Upload Plugin in WordPress. Install the ZIP and activate Rebilder. Check a public page to confirm it is working:

```
curl -H "Accept: text/markdown" https://your-site.com/your-page/
```

You should get markdown. Loading the same URL in a browser is unchanged. Skip everything else and the plugin never makes a network request; the optional key in Settings → Rebilder is what turns reporting on.

## Connecting it to your Console

> **Connect reporting when you need it** Connect reporting in the plugin settings to send gateway events to your Console. Reporting stays off until an API key is configured.

To connect: issue a key in [Console → Settings](/console/settings), paste it into Settings → Rebilder in wp-admin, and press Connect. Saving makes one blocking request to check the key is live, so a typo tells you immediately instead of leaving you with an empty Console. Disconnect in the same place; the key is deleted and the plugin goes back to sending nothing. Uninstall deletes it too.

What is sent: at most one small record per page load, after the page has been delivered, as a non-blocking request whose reply is ignored. The record carries the time, the requested URL **with the query string stripped** except for `page`, `variant`, `sku`, `lang`, `locale` and `currency`, the `Accept` header, which agent it appeared to be (always unverified: the plugin parses the claim and never checks a signature), the referring site as an origin like `https://chatgpt.com` and never the full link, what was served, and the render time in milliseconds.

What is never sent: IP addresses, cookies, anything about a logged-in user, form contents, search terms, order or customer data, and your page content. **Nothing a visitor typed**. Query capture is excluded from the plugin’s reporting payload.

Search results pages are dropped entirely, and that is a second mechanism rather than the same one. WordPress writes a search two ways: `?s=<term>`, which the query allowlist removes, and the pretty permalink `/search/<term>/`, which it cannot, because `request.url` keeps the path verbatim and core registers that permastruct itself. So the plugin asks core’s own `is_search()` and returns before an event is built: no event rather than a redacted one. A search results page is not a document any site could have served markdown for, so the miss it would report is the same miss every time.

> **Understand WordPress reporting coverage** The plugin reports agent requests, crawler requests and AI-referred human visits. It excludes ordinary human pageviews. Read those request counts directly; add the Rebilder Tag when you also need browser pageview reporting.

The site key does one thing: it reports visits to your Console. It cannot read your Console or download answers. To publish answers, export them from the Answers Console and paste the export into Settings → Rebilder. Keep the key private and rotate it in Console Settings when needed.

## Search crawler responses

> **Crawlers can never reach the markdown path** Googlebot and bingbot are identified before any other signal is examined, so they receive exactly the HTML a human receives, even if they send a markdown `Accept` header. This keeps crawler responses aligned with the HTML your visitors receive. Tests verify this classification order.

The detection tables are compared, mechanically, against `@rebilder/agent-detect`, the same tables the hosted gateway uses. Adding a pattern to one and not the other fails the build.

## Caching

> **Your cache must respect `Vary: Accept`** The plugin returns two different bodies for one URL depending on a request header, and sends `Vary: Accept` on every response to keep them apart. If your caching plugin or CDN strips or ignores `Vary`, the first response into the cache is the one everybody gets: one agent’s markdown served to every human, or one human’s HTML served to every agent. Configure it to vary on `Accept` for your pages.

Markdown responses also tell page caches not to store them. They set `DONOTCACHEPAGE`, which most WordPress page cache plugins read, send no-cache headers, and send `X-LiteSpeed-Cache-Control: no-cache` for LiteSpeed. Your HTML pages are cached as usual.

## WordPress source values

Every value in the markdown is read from WordPress or WooCommerce. No AI model runs at any point. Prices match your product page: the plugin prints WooCommerce’s display price, so your tax display setting, price decimals and price suffix apply, followed by your shop’s currency. Variable and grouped products show the same range the page shows. A discount is only shown when WooCommerce says the product is on sale, because comparing the two numbers ourselves would be us deciding what is on sale.

Availability comes from `is_in_stock()`, WooCommerce’s own computed truth, rather than from inventory arithmetic. Stock counts follow your “Stock display format” setting: always shown, shown only when low, or never shown. This keeps the markdown aligned with your storefront.

## Reporting and rendering details

- Use the scanner to check readability. The plugin serves your website content to agents and connects reporting to the Console.
- Review request reporting in the Console after connecting an API key in the plugin settings.
- The plugin verifies the key when you save it. If reporting later stops, check the key and confirm a test request reaches the Console.
- Markdown is rendered on request rather than pre-generated on save. It is always fresh and there is nothing to invalidate; for a human visitor the plugin reads two headers and gets out of the way.

Deeply nested markup is worth knowing about: PHP’s HTML parser refuses documents nested more than 256 elements deep, which a page-builder theme can genuinely produce. The plugin detects that case and falls back to the post’s plain text (formatting lost, words kept) rather than serving an empty body.