Multisite
Both network types are supported, and both are chosen at create time:
rex site create network.rex --type wordpress --multisite subdomainrex site create network.rex --type wordpress --multisite subdirectorySubdomain networks get a wildcard certificate
Section titled “Subdomain networks get a wildcard certificate”A subdomain network serves sub.network.rex, and each of those needs to be trusted. rexenv
issues the site’s leaf certificate with a wildcard SAN, so every subsite gets the green
lock without a certificate per subsite.
DNS is already handled: rexenv’s resolver answers *.rex, so a new subsite resolves the
moment WordPress creates it — no /etc/hosts entry, no restart.
Subdirectory networks
Section titled “Subdirectory networks”network.rex/site-one. Nothing special is needed for certificates, since it is all one
hostname. rexenv generates the rewrite rules the network type requires — the config generator
keeps a separate template for single sites, subdomain networks and subdirectory networks
precisely because their rewrites differ.
Sharing a network through a tunnel
Section titled “Sharing a network through a tunnel”A Cloudflare quick tunnel issues one hostname and pins one Host header, so a subdomain
network’s sub-sites have nothing to resolve through it — an outside browser gets
ERR_NAME_NOT_RESOLVED, and there is no wildcard to ask for.
While the share is up, rexenv serves a subdomain network as a subdirectory network:
<public-url>/s1/… is turned back into a request for s1.<network>, so every site in the
network can be tested through the one link. Local behaviour is untouched — s1.msd.rex still
serves natively, and msd.rex/s1/ is still a 404, because locally it is not a subdirectory
network.
Subdirectory networks are shared as they are: one hostname is all they ever needed.
Managing the network
Section titled “Managing the network”rex wp network.rex user listrex wp network.rex plugin listrex wp network.rex plugin activate my-pluginThe app’s WordPress manager shows network-level plugin and theme state, and network admin is
one magic-login click away. Themes can be network-enabled from the theme card — the toggle
reads its current position from the network’s own allowedthemes option, because
wp theme list has no network-enabled status to report and a toggle that cannot say what it
would undo is not a control.
Testing a real network locally
Section titled “Testing a real network locally”The two things that usually make multisite painful locally are wildcard DNS and wildcard certificates. Both are handled here, which means a subdomain network behaves the way it will in production rather than the way local workarounds usually force it to.