bext-wp has two transport modes:
- Auto — WordPress is served by a bext server on the same machine. All calls go to the
loopback main listener (
http://127.0.0.1:80) and are gated by bext's loopback check. No credentials needed. This is the default. - Cloud — WordPress talks to a remote bext endpoint (e.g. your site behind bext cloud). Calls go to the configured URL with a bearer token.
Use Cloud mode when the PHP process is not on the same host as the bext edge — for example a managed-WordPress box behind a bext cloud edge, or any split where loopback can't reach bext.
Bext → Settings:
- Mode →
Cloud. - Cloud endpoint URL → the bext origin that serves your site, e.g.
https://www.example.com. - Cloud API token → the purge token (see below).
- Test connection to confirm
<endpoint>/__bext/healthis reachable.
…or in wp-config.php:
define( 'BEXT_WP_MODE', 'cloud' );
define( 'BEXT_WP_CLOUD_URL', 'https://www.example.com' );
define( 'BEXT_WP_CLOUD_TOKEN', 'a-long-random-secret' );Remote purges are opt-in. Set a token on the bext server and the
POST /__bext/cache/purge-proxy endpoint will accept requests carrying a matching
Authorization: Bearer <token> (constant-time compared), in addition to the existing loopback
and admin-JWT paths:
# /etc/default/nginx (or the service EnvironmentFile), then full restart:
BEXT_PURGE_TOKEN=a-long-random-secretThe same value goes in the plugin's Cloud API token. Without the env var set, remote purges are rejected (the endpoint stays loopback/admin-only).
Security: the token authorizes purges for the
hostin the request body. Use a long random secret over HTTPS, and rotate it by updating both sides. Per-tenant scoping (a token limited to one host) is a planned enhancement; today a token is trusted for any host it names.
| Feature | Auto | Cloud |
|---|---|---|
| Purge-on-change / manual purge | ✅ loopback | ✅ bearer token |
| Personalization-safe headers | ✅ | ✅ |
| Action Scheduler taming | ✅ | ✅ |
| Dashboard / health | ✅ | ✅ (health via the endpoint) |
| SDK email / jobs | ✅ loopback app-id |