A construction gate for a site that is not ready for the public. One shared password seals the whole site: pages, the REST API, feeds, sitemaps, embeds and XML-RPC. Anonymous visitors see a "Coming soon" screen with a password form and an HTTP 503, so search engines index nothing. Logging in does not open the gate; a capability does, so editors and administrators keep working as usual.
Download v1.0.0Retry-After, X-Robots-Tag: noindex, nofollow, no-cache headers) with a password form. A correct password sets an HttpOnly, Secure, SameSite=Lax cookie (wsgate_access, a signed token; the password itself is never stored in it) good for 7 days by default.edit_posts). A logged-in subscriber is gated like any visitor; editors and administrators see the full site. The password grants no account and no capabilities.ws_gate_allowed_paths filter (default /.well-known/, for certificate renewals). It never covers REST, feeds, sitemaps, embeds or XML-RPC.?rest_route= (401), feeds (503), wp-sitemap*.xml (503, sitemaps disabled), embeds (503), XML-RPC (403, disabled), wp-links-opml.php and wp-trackback.php (403). Every response carries noindex, nofollow while the gate is on.sodium_crypto_secretbox, key derived from the site's auth salts, readable back in the settings screen (show, copy, generate) so the owner can share it. Changing the password or "Revoke all access" invalidates every issued cookie at once.Retry-After. The form carries a nonce and a honeypot field.wp-login.php and its lost-password flow, so administrators can always log in; admin-ajax.php and admin-post.php; wp-admin (WordPress guards it); static assets under wp-content and wp-includes; and media files under wp-content/uploads/, which the web server serves without PHP, so they stay public while gated.
Define WSGATE_OFF as true in wp-config.php to force the gate off regardless of the setting: for emergencies, or to bring a site back up without touching the database. The ws_gate_enabled and ws_gate_bypass filters offer the same override in code.
ext/sodium for encrypted storage; falls back to plaintext with a visible warning)Updates are self-hosted: the plugin reads its Update URI header and checks https://websqu.ad/updates/ws-gate.json. New versions show up in the standard WordPress updates screen.
wp ws-gate status — summary and self-checks; exits 1 on any fail.wp ws-gate on / wp ws-gate off — enable or disable the gate.wp ws-gate password — print the current password; wp ws-gate password "new pw" sets one; --generate generates, stores and prints one.wp ws-gate revoke — revoke all access cookies.curl -sI https://example.com/ — 503curl -s https://example.com/wp-json/wp/v2/posts — 401 JSONcurl -sI https://example.com/wp-admin/ — 302 to the login URLws_gate_enabled — force the gate on or off.ws_gate_bypass — per-request escape hatch (a specific IP, a query variable).ws_gate_bypass_capability — the capability that passes.ws_gate_client_ip — map a proxy header instead of REMOTE_ADDR for rate limiting.ws_gate_allowed_paths — extra allowlisted URI prefixes.ws_gate_template, ws_gate_screen_data — swap the gate screen's template or edit its data.websquad — brandsquad OÜ, Estonia. Support: [email protected]