Diese Anleitung ist noch nicht übersetzt und wird deshalb auf Englisch angezeigt.

Grounded for WordPress

The plugin does two things: it puts your assistant on every page of your WordPress site, and it tells Grounded when you publish, update or trash a post, so the assistant answers from what the site says now and not from what it said at the last scheduled run.

It needs WordPress 6.0 or later and PHP 5.6.20 or later, the floor of WordPress 6.0 itself. It has no dependencies. Auto-sync, which this builds on, is part of Pro and Business.

Two ways to give the bot your content, and you can use either:

  • Your site is its own front end — WordPress serves the pages visitors see. The bot reads them through your sitemap, and the plugin tells it when one changes. This is most of this page.
  • WordPress is only a backend — the front end is another app (Next.js, Astro, a mobile app), so WordPress's sitemap lists addresses nobody visits. The plugin hands the content over directly, over a private channel. See A WordPress that is only a backend.

What you need first

  1. A bot with your site as a source. On the bot's Documents page add your sitemap (see below) with Keep in sync ticked.
  2. The bot key, on the bot's Install page. Add your site there under Allowed domains, or the widget will not answer.
  3. The webhook address and secret, on the sitemap source's card under Webhook. Press Create secret and copy it; it is shown once. See Webhooks.

Install

Download the plugin. In WordPress go to Plugins → Add New → Upload Plugin, choose the zip, install and activate it.

Open Settings → Grounded and fill in:

Field What to put there
Bot key pk_…, from the bot's Install page. Empty means no widget is shown.
Side Which corner the launcher sits in.
Content to report The kinds of content Grounded is told about. See Choose what is reported.
Webhook address https://…/api/sources/…/hook, from the source's card.
Webhook secret whsec_…. It is stored on your site and never printed on a page. Leave the field empty later to keep the stored one.

The Grounded address only changes if you host Grounded yourself. It is where the widget's script is loaded from, on every page, so only a user who is allowed to add scripts to the site (a super admin on a WordPress network) can change it. The webhook address must be https.

If you change the webhook address later, enter the secret again with it: the stored secret is only used for the address it was saved with, so an address typed by someone else cannot be used to read it out.

Languages. The widget opens in the language of the page it is on: Polylang's or WPML's language for that page, else your site's language. If the bot answers in that language (Settings → Languages in Grounded), its buttons, welcome and starter questions are in it; either way, each answer follows the language the visitor writes in. Nothing to set in the plugin.

Then press Send test ping. It names your home page and shows what Grounded answered: HTTP 202 and a short summary mean the address and secret are right.

Point the bot at your sitemap

WordPress publishes one by itself, at /wp-sitemap.xml (since WordPress 5.5). On the bot's Documents page choose Add documents → Sitemap, paste https://your-site.com/wp-sitemap.xml, press Preview, and keep Keep in sync ticked.

  • It lists every public kind of content: posts, pages, WooCommerce products and your own types.
  • It also lists author and category archives. They hold links to your content and no text of their own, so under Skip paths starting with add /author, /category and /tag.
  • SEO plugins such as Yoast SEO and Rank Math publish their own sitemap, usually at /sitemap_index.xml. Open it and use it instead if you prefer; Preview tells you what it finds.

The sitemap is what Grounded reads at its scheduled runs (every day on Pro, every hour on Business). The plugin is what makes a change show up in minutes.

Choose what is reported

Under Content to report the plugin lists every kind of content on your site that has an address of its own, with its name and slug. Only the ones you tick are reported. Until you save, that is posts and pages, and products if WooCommerce is installed.

  • Posts and pages — reported when published, updated, set back to draft or private, trashed, or deleted for good.
  • WooCommerce products — the same, so a changed price, description or image is read again. A product that goes out of stock or comes back is reported too, even though nobody saved it: the order that sold the last one did. Variations belong to their product.
  • Advanced Custom Fields — a post's fields are saved with the post, so it is reported like any other. The post types ACF 6.1 and later register are listed with the rest. Saving an ACF options page has Grounded read the whole source again, because what it holds (an address in the footer, opening hours) shows on many pages.
  • Any other custom post type — listed when it is public.

Tick only what you want the assistant to answer from. A kind that is not ticked is still read at the scheduled runs if its pages are in the sitemap.

What happens when you save

Everything a request changes goes out as one call after the page has loaded: a bulk edit of twenty posts is one ping with twenty addresses. The call never waits for Grounded, so saving a post takes as long as it did before, and if Grounded cannot be reached the save still succeeds. The price of that is that a failed ping is lost and nothing on your site says so; the scheduled run picks the change up later, and Send test ping is how you check the setup.

Grounded then reads the named pages from your public site, not from the ping, so a page the public cannot open (a draft, a private post) is never read. A page that was trashed answers 404, and Grounded removes it from the bot.

More than a hundred addresses in one request, or an ACF options page, is a request to read the whole source instead. Grounded accepts at most 30 calls a minute per source, and about two minutes of crawling a minute across a bot's sources; a long bulk run is covered by the scheduled runs.

A WordPress that is only a backend

Crawling a headless site gets the bot nothing: the public sitemap points at a front end that was not built to be read, and anything that was never meant to be public is not in it at all. Here the plugin serves its content and Grounded reads it, on a channel only Grounded's key (and you, in the WordPress admin) can open. There is no crawl, no HTML to clean up, and no link is required.

  1. Install the plugin as above, and tick the kinds of content under Content to report. Any kind with an editor screen is listed, public or not; WooCommerce's orders and coupons never are.
  2. Open Settings → Grounded → The key and press Make a key. It looks like gwp_… and is shown once. Only a hash of it is kept on your site.
  3. In Grounded, on the bot's Documents page choose Add documents → WordPress, enter the address where WordPress itself lives (the one of its admin, such as https://cms.acme.com) and paste the key. It is tried against your site before anything is kept, and stored encrypted.
  4. For changes within a minute, press Create secret under the source's Webhook, and paste the address and secret into the plugin's webhook fields as for a sitemap source. Without this, changes are read at the next scheduled run (every day on Pro, every hour on Business).

Connecting WordPress is part of Pro and Business, like the other sources.

What is sent

  • Published content of the kinds you ticked. Drafts, pending posts and posts with a password are never sent.
  • Private posts only for a kind whose Also send private box you ticked, under the warning that goes with it (below).
  • A post you left out: every ticked kind has a Do not send this to Grounded box on its edit screen.
  • Cleaned text, not HTML. Headings become # lines — the sections an answer cites — and lists become - lines. Shortcodes, scripts and styles are removed, not run. An item is cut at 200 KB.
  • Advanced Custom Fields, by group. Under ACF field groups tick the groups to send; none is sent until you do, and a group you add later stays out until you tick it. Password fields are never sent. The fields of a ticked group that applies to a post follow its text, and groups, repeaters and flexible content are read all the way down: each value sits on a line that says where it is, such as Schedule 2 › Weekday: Friday, so an answer can cite the right row. Posts, terms and users in a field are their names, a link is its text, a choice is its label; images and files are left out. Plain custom fields (not ACF's) are listed by name under Extra fields. For WooCommerce products, tick Add price, stock, SKU and attributes.
  • Fields that run the site stay out. Fields to leave out lists the fields of the ACF groups you send, sub-fields under their parent, and your extra fields. Tick the ones that are bookkeeping rather than an answer — an internal flag, a staff-only list — and save. Nothing inside a field left out is sent. A field that should be sent but needs explaining (a room called krasnojarsk, a date written 20260905) is better described to the bot: add a line such as "Room: the room the class is in; krasnojarsk is the Krasnoyarsk room" to its Instructions in Grounded.
  • An address, only if you give a pattern. Under Address pattern write where an item lives on your public site, such as https://acme.com/{type}/{slug} ({id} and {path} also work). Leave it empty for an item that has none: an answer then cites its title and section, without a link.

What Grounded will see on the same page lists the latest items and shows any one as the text Grounded is given, before you connect anything.

Private content: read this first

Grounded has no per-document audience. Whatever is in a bot's documents can be quoted to anyone who talks to that bot, passage text included. If you tick private posts, put them in a bot that is not installed on a public site, such as one behind your own login, or reached through the MCP server.

How it stays in step

  • The first read lists every item. After that, each run asks the plugin only for what changed since the last one, and for what was removed — a trashed, unpublished or deleted item leaves the bot.
  • Once a week the run lists everything again, which is what catches a change that was never reported. If that list is less than half of the last one — the plugin was switched off, or a kind was unticked — deletions are held and the card says so; confirm there if the site really did shrink.
  • Changing what is sent reads everything again. Ticking an ACF group, adding an extra field or a field to leave out, updating the plugin when it changes how an item is written, changing the address pattern or switching private posts edits no post, so nothing would look changed. The plugin stamps its settings on every item it serves, and Grounded lists everything and re-reads what the new settings make different at its next run (Sync now on the card, within ten minutes of the last one). Text that comes out the same is not embedded again.
  • The plugin keeps a record of removals for 90 days. A source that did not read for longer lists everything again.

The channel, for the curious

All three routes answer GET under /wp-json/grounded/v1 and need Authorization: Bearer gwp_…:

Route Answers
/ids?page=&per_page= { items: [{ type, id, modified }], page, pages, cursor } — everything served
/changes?since=<cursor>&limit= { items: [{ type, id, modified, status }], removed: [{ type, id }], next, more }
/items/{type}/{id} { id, type, title, modified, url, text } — url is null without a pattern

Anyone else — no key, a wrong one, a logged-in subscriber, a cookie without its nonce — gets 401 and the answer WordPress gives a route that does not exist. The routes are not listed in /wp-json/. Five wrong keys from one address in a minute are answered 429.

Troubleshooting

  • Send test ping says 401 — the secret is wrong or was replaced. Create a new one on the source's card and paste it here.
  • It says 403 or 409 — the message names the reason: the plan has no auto-sync, or the source is paused, or the bot is switched off.
  • The ping works and the bot still answers from the old page — a page cache serving Grounded the old HTML. Most caching plugins clear a post's page when it is updated; if yours does not, add the post's address to its purge-on-update rules.
  • Pages come back empty or 403 — a security plugin or a CDN's bot challenge is stopping GroundedBot. Allow that user agent.
  • A local or password-protected site — Grounded reads your site from the internet, so a site on localhost, behind a login or on a staging password cannot be read, though the plugin will still send the ping.
  • A post's address changed — the new address is reported; the old one is removed at the next scheduled run.
  • Grounded says the plugin's channel was not found — the plugin is not active, or permalinks are set to Plain: the channel lives under /wp-json/, which Plain permalinks do not have. Choose any other structure under Settings → Permalinks.
  • Grounded says WordPress refused the key — the key was made again, or was copied with a space. Make a new one and paste it with Change key on the source's card. Some hosts strip the Authorization header before WordPress sees it; if a new key is refused too, ask the host to pass it through (for Apache, the HTTP_AUTHORIZATION rewrite rule that Application Passwords also need).
  • The widget does not show — check the bot key, that your site is under Allowed domains, and that your theme prints the footer (wp_footer()).

Developing against a local Grounded

The webhook address must be https and must not point at the machine WordPress runs on, at a private network address or at a port other than 80, 443 or 8080: an address typed on a settings page must not be a way to make your server call something inside its own network. To point it at a Grounded on localhost or on your network anyway, add this to wp-config.php, which only someone with access to the files can do:

define( 'GROUNDED_ALLOW_INTERNAL_HOOK', true );

Update it

Upload the new zip the same way: WordPress says a version of the plugin is already installed and offers to replace it. Your settings are kept. The first time version 1.1 loads it creates a small table of removals, which is all it adds.

Remove it

Deactivate the plugin and the widget and the pings stop. Deleting it from the Plugins page also deletes the settings it stored, its table of removals and the Do not send marks on posts. Your posts, pages and products are not touched either way.