Skip to content
webdesign29 edited this page Jun 13, 2026 · 1 revision

WP-CLI

bext-wp registers the wp bext command family (available when the plugin is active).

wp bext status              # integration status (mode, host, app id, purge endpoint)
wp bext purge               # purge the entire site cache
wp bext purge /about/       # purge a single path
wp bext doctor              # run the health checks

wp bext purge [<path>]

Purges via the same purge-proxy endpoint the auto-purge uses.

  • No argument → purge the whole site (prefix = the install base path).
  • A positional <path> → purge exactly that path.
wp bext purge                       # whole site
wp bext purge /blog/hello-world/    # one URL

The path is a positional argument on purpose: --url and --path are WP-CLI global flags (--path sets the WordPress directory), so an option flag would be swallowed.

wp bext status

+----------------+----------------------------+
| key            | value                      |
+----------------+----------------------------+
| Behind bext    | yes                        |
| bext version   | bext/0.2.9                 |
| Canonical host | example.com                |
| App id         | example.com                |
| Purge endpoint | /__bext/cache/purge-proxy  |
+----------------+----------------------------+

Under WP-CLI there's no BEXT_SERVER FastCGI param, so Behind bext reflects the sticky flag / mode, and bext version may be blank. That's expected — see Troubleshooting.

wp bext doctor

Prints the dashboard health checks as a table (check / status / detail) — handy in CI or over SSH.

Scripting examples

# Purge a list of URLs after a bulk import:
while read -r url; do wp bext purge "$url"; done < changed-urls.txt

# Fail a deploy if not behind bext:
wp bext status | grep -q 'Behind bext.*yes' || { echo "bext not detected"; exit 1; }

Clone this wiki locally