Skip to content

Multisite

webdesign29 edited this page Jun 13, 2026 · 2 revisions

Multisite

bext-wp is fully WordPress-Multisite-aware. All multisite behavior is guarded by is_multisite(), so single-site installs are unaffected.

Network Admin → Bext

Network-activate the plugin (or deploy it as a must-use plugin) and a Bext menu appears in Network Admin for super-admins (manage_network_options):

Network defaults

The same settings as the per-site page, applied network-wide. They act as defaults every site inherits. Turn on Enforce on all sites to make them override each site's own settings.

Sites

A table of every site — bext status, mode, and last purge — with a Purge button per site and a Purge all sites button. (Capped at the first 500 sites; large networks show a note.)

Settings precedence

Each setting resolves as (highest wins):

wp-config constant  >  network (Enforce on)  >  site setting  >  network (default)  >  built-in default

On single-site this collapses to "site setting > default" — identical to before. See Configuration for the full field/constant list.

Once a site saves its own Settings page, those choices are stored explicitly and win over non-enforced network defaults (a saved value isn't "inherit"). Turn on Enforce to override sites that have already configured themselves.

When enforcement is on, the per-site Bext → Settings page shows a notice that some values are managed at the network level.

App ID & cache keys

bext keys its cache by host:

Topology Host Purge scope Default App ID
Single-site unique whole site host
Subdomain multisite (a.example.com) unique per blog whole blog host
Subdirectory multisite (example.com/a) shared scoped to the blog path (/a/) host-a (disambiguated)

So subdirectory blogs never wipe each other's cache, and their SDK queue/email config stays isolated.

Cross-blog correctness

Per-request caches (settings, detection, host) reset on switch_blog, so any operation that loops over blogs reads the correct blog's configuration.

Purging from the network via WP-CLI

# Every site:
for url in $(wp site list --field=url); do wp --url="$url" bext purge; done

# One path on one site:
wp --url=https://example.com/blog-a/ bext purge /hello/

--url is WP-CLI's global flag selecting the site; the bext purge target is the positional path — see WP-CLI.

Uninstall

uninstall.php removes all bext_wp_* options on every site, plus the bext_wp_network_settings site-option.

Clone this wiki locally