WordPress Connector
Connect a WordPress site to Shield: origin lock that WordPress enforces itself, real visitor IPs, and a checklist that shows whether the site is actually protected.
Shield blocks attacks at the edge. The Sectora Connector plugin adds what only your server can do: refuse requests that skipped Shield, and give WordPress the visitor's real IP address. It never runs rules and never executes anything sent from Sectora; it only fetches a secret and settings.
Connect the site
- Add the site in Shield and point DNS at it (Setup & DNS).
- In WordPress, install and activate Sectora Connector.
- In Sectora, open the site → WordPress → Create connection token.
- In WordPress, go to Settings → Sectora Shield, paste the token, click Connect.
- Enable origin lock (below), then click Verify.
DNS points to Shield
Your domain needs a CNAME to customers.sectora.io, set to DNS only (gray cloud on Cloudflare). A proxied (orange cloud) record puts Cloudflare's own free-plan WAF and rate limits in front of Shield. The checklist turns green once Shield has a certificate for the hostname and sees the record.
Shield mode
Monitor logs what Shield would block; Block enforces. Start in monitor, check the site's traffic for false positives, then switch to block on the site's page in Sectora.
Origin lock
Shield adds a secret header (X-Shield-Secret by default) to every request it forwards. The plugin refuses requests without it, so someone who finds your server's IP can't go around Shield.
- Enable origin lock for the site on its Origin Lock page in Sectora. You don't need to copy the secret: the plugin fetches it.
- In WordPress, open Settings → Sectora Shield through your normal domain and click Enable origin lock. The plugin only allows this when that very request arrived through Shield with the right secret, so you can't lock yourself out by enabling it too early.
There are two layers, and the checklist shows which one is active:
- PHP layer (always on with the lock): a must-use plugin checks the header before any other plugin loads and answers
404on a mismatch. It only sees requests that load WordPress. - Server layer (recommended): a rule in
.htaccess(Apache, LiteSpeed) or your nginx config that answers403. It also covers static files and plugin PHP files requested directly, which never load WordPress and are a common way to exploit vulnerable plugins.
Server rule: Apache and LiteSpeed
Click Add .htaccess rule in the plugin. It writes a block between # BEGIN Sectora Shield and # END Sectora Shield at the top of .htaccess, above WordPress's own rules and above caching plugins' rules, and keeps it up to date when the secret rotates. The rule refuses any request whose header is shorter than 32 characters or doesn't match an accepted secret.
It has no effect, without any error, when:
- the server has
AllowOverride None(Apache ignores.htaccess); - PHP is sent to PHP-FPM with
ProxyPassMatch(useSetHandlerin a<FilesMatch>instead, or put the rule in the vhost); mod_cacheserves cached responses first (setCacheQuickHandler Off).
That is why the checklist trusts Verify, not the file.
Server rule: nginx
The plugin can't edit nginx configuration. It shows a snippet with your current secrets to paste into every server { } block that serves the site (HTTP and HTTPS, and any default_server), before any location block, then reload nginx. During a rotation the plugin waits for you: paste the updated snippet (it accepts both secrets), reload nginx, then click Confirm rotation. It has this shape:
if ($http_x_shield_secret !~ "^.{32,}$") { return 403; }
set $sectora_shield_ok 0;
if ($http_x_shield_secret = "<current secret>") { set $sectora_shield_ok 1; }
if ($sectora_shield_ok = 0) { return 403; }Managed hosts without server configuration access (some nginx-only hosts) can only use the PHP layer, so those sites stay at Partial.
Verify
Verify (in the plugin or on the site's WordPress page in Sectora) sends live requests from Sectora to your origin: the home page and wp-includes/js/jquery/jquery.min.js without the header, the same file with it, and the connector's own index.php without it.
- Protected: all requests without the header are refused, and the file loads with it.
- Partial: pages are refused, but the static file or plugin file is served without the header. Add the server rule.
- Failed: the home page is served without the header, refused even with it, or the origin is unreachable. The message says which.
Rotating the secret
Rotate from the site's WordPress page in Sectora, not from the Origin Lock page (which refuses while a plugin is connected or enforcing). The new secret is staged: the plugin fetches it and accepts both, Shield switches only after the plugin confirms, and the old secret stays accepted for two more hours after Shield has it. No request is rejected during the switch. The plugin confirms only once its .htaccess rule holds the new secret; on nginx (or any server that ignores .htaccess) you confirm by hand after updating your rule.
Only hostnames that use the same secret and the same origin rotate together. If the secret is also used by a hostname that proxies to another backend, the rotation is refused: give the WordPress site its own secret first.
Locked out? Break-glass
To turn off the PHP layer, add this to wp-config.php above the "stop editing" line:
define('SECTORA_ORIGIN_LOCK', false);To turn off the server layer, delete everything from # BEGIN Sectora Shield to # END Sectora Shield in .htaccess (or remove the nginx snippet and reload). WP-CLI is never blocked, so wp option update sectora_connector_lock 0 also works.
Real visitor IP
Shield sends the visitor's IP in X-Forwarded-For. Only on requests with a valid secret, the plugin sets REMOTE_ADDR to it before other plugins load, so comments, WooCommerce and security plugins see the visitor, not Cloudflare. On any other request the header is ignored, so it can't be spoofed by calling your server directly.
WP-Cron, Site Health and server cron
WordPress's requests to its own address (WP-Cron, Site Health, REST loopback) get the header added by the plugin, only for your site's own host and never across a redirect. A server cron job that calls wp-cron.php over HTTP on the server itself is refused like any direct request: run wp cron event run --due-now (WP-CLI) instead.
Disconnecting
Disconnect in the plugin removes the .htaccess block and the must-use plugin, then revokes the token, so the site goes back to normal (it refuses if the block can't be removed). Deactivating the plugin removes the enforcement but keeps the connection; deleting it also revokes the token. Revoking the token in Sectora instead leaves the lock running with the secret the plugin has, so nothing is locked out, and the Origin Lock page keeps refusing to change that secret. If the plugin is gone for good, tick The plugin is no longer installed when you revoke.
What the plugin sends
Only to https://sectora.io/api/shield/connector/v1/: plugin, WordPress and PHP versions, the web server name, which layer is active, the site URL, and short SHA-256 fingerprints of the secrets it holds. No users, content or settings.