Description
Sectora Security protects your WordPress site with Sectora Shield, a web application firewall (WAF) that runs on a global edge network in front of your site. Attacks, bad bots and password guessing are stopped there, before they reach your server, your PHP and your database.
This plugin connects your site to Shield and locks your server, so attackers cannot go around the firewall.
What you get
- A firewall built for WordPress. 20 WordPress rules: user enumeration, XML-RPC brute force and pingback floods, access to
wp-config.php,debug.logand backup files, PHP files inuploads, the theme and plugin editors, the install script, REST API probing andwp-cron.phpabuse. Plus built-in protection against the common web attacks (OWASP Top 10): SQL injection, cross-site scripting (XSS), command injection, path traversal, XXE, template injection and Log4Shell-style attacks. - Login protection. WordPress answers a failed login with a normal page, so a firewall that only looks at error codes cannot tell a login failed. Shield recognises failed logins on
wp-login.phpand locks out the source after repeated failures. A real login is not affected. - Bot protection and rate limiting. Slow down or block automated traffic and request floods.
- Block by IP address or country.
- Origin lock. Shield adds a secret header to every request it forwards. The plugin refuses requests without it, so someone who finds your server’s IP address cannot skip the firewall.
- Real visitor IP addresses. WordPress and your other plugins see the visitor’s IP address, not the firewall’s.
- Test before you block. Every rule can run in Monitor mode first: it logs what it would block, and you switch it to Block when you are happy. “Apply recommended” turns on the rules that do not break normal WordPress use.
- See what was blocked. The Sectora dashboard shows blocked requests, top countries and IP addresses, and one checklist that answers “is my site protected?”: DNS, firewall mode, plugin and origin lock, verified from the outside.
Why an edge firewall, not a firewall plugin?
Most WordPress security plugins run inside WordPress. A request has already reached your server, started PHP and often queried your database before such a plugin can refuse it. Sectora works differently:
- Attacks never reach your server. Blocking happens on the edge network, so a flood of bad requests does not use your server’s CPU, PHP workers or database.
- The rules do not live on your site. They are not stored in your database or files, so a flaw in another plugin cannot switch them off. The plugin itself stays small: it runs no firewall rules and executes no code sent from Sectora.
- No back door around the firewall. Edge firewalls can be bypassed by sending requests straight to the server’s IP address. The plugin’s origin lock refuses those requests, and Sectora verifies the lock from the outside.
- Works alongside other plugins. Sectora does not replace backups, updates or a malware scanner, and it runs fine next to them.
How to get started
- Create an account at sectora.io and choose a plan that includes Shield.
- In Sectora, click Add WordPress site. The wizard shows the DNS records to set at your domain provider and waits until they work.
- Install this plugin, then paste the connection token from the wizard in Settings → Sectora Shield.
- Click Apply recommended for WordPress protection and login protection.
Requirements: a paid Sectora account with Shield, and access to your domain’s DNS settings.
Two layers on your server
- PHP layer (on whenever origin lock is on): a small must-use plugin checks the header before any other plugin loads, and answers 404 when it is missing or wrong. It only sees requests that load WordPress.
- Server layer (recommended): a rule at the top of
.htaccess(Apache, LiteSpeed), or a snippet you paste into your nginx configuration. It also covers static files and plugin PHP files requested directly, which never load WordPress.
With the PHP layer only, the plugin reports Partial, never Protected.
External services
This plugin connects to the Sectora API at https://sectora.io/api/shield/connector/v1/ (operated by Sectora, terms, privacy policy). It sends nothing until you paste a connection token and click Connect. Every request carries that token in an Authorization header.
GET config(on connect, then every 5 minutes, and when you open the settings page): receives the origin-lock secret(s), the header name and the Shield mode. Sends nothing else.POST heartbeat(after each config fetch and after you change a setting): sends the plugin version, WordPress version, PHP version, the web server name (SERVER_SOFTWARE), which layer is active (none,phporserver), whether the lock is on, the site URL, and the first 16 hex characters of the SHA-256 hash of each secret it holds (so Sectora knows a new secret has arrived before switching Shield to it).GET status(when you open the settings page, at most once a minute): receives Shield’s view of the site (DNS, mode, verification result, time of the last request).POST verify(when you click Verify): asks Sectora to send test requests to your server, with and without the header, to the home page,wp-includes/js/jquery/jquery.min.jsand this plugin’sindex.php.POST disconnect(when you click Disconnect or delete the plugin): revokes the token.
No user accounts, posts, comments, options or other content are ever sent.
Installation
- Add your site in Sectora Shield and point DNS at it.
- Install and activate this plugin.
- In Sectora, open the site, go to WordPress, and click Create connection token.
- In WordPress, go to Settings → Sectora Shield, paste the token and click Connect.
- Enable origin lock for the site in Sectora (on its Origin Lock page). You don’t need to copy the secret.
- Open Settings → Sectora Shield through your public domain and click Enable origin lock. On Apache or LiteSpeed, also click Add .htaccess rule. On nginx, paste the snippet shown on the page.
- Click Verify.
The plugin only lets you enable the lock when the settings page itself came through Shield with the right secret, so you cannot lock yourself out by enabling it before DNS points to Shield.
FAQ
Do I need a Sectora account?
Yes. The firewall runs on Sectora’s network, so a paid Sectora account with Shield is required. The plugin connects your site to it and adds what only your server can do.
Does Sectora scan my files for malware?
No. Sectora blocks attacks before they reach your site; it does not scan the files on your server. Keep your backups and updates, and use a malware scanner if you want one: they work alongside Sectora.
Can I use it with other security plugins?
Yes. Sectora does not change how other plugins work, and they see the visitor’s real IP address.
I am locked out. How do I turn it off?
Add this line to wp-config.php, above “That’s all, stop editing!”:
define( 'SECTORA_ORIGIN_LOCK', false );
That turns off the PHP layer. To turn off the server layer, delete everything from # BEGIN Sectora Shield to # END Sectora Shield in the .htaccess file in your WordPress folder (or remove the nginx snippet and reload nginx).
WP-CLI is never blocked, so wp option update sectora_connector_lock 0 also works.
Does WP-Cron still work?
Yes. WordPress’s requests to its own address (WP-Cron, Site Health, REST loopback) get the header added, only for your site’s own host and never across a redirect. A server cron job that requests wp-cron.php over HTTP on the server itself is refused like any direct request; use wp cron event run --due-now instead.
Can I keep the secret in wp-config.php instead of the database?
Yes. Define SECTORA_SHIELD_SECRET in wp-config.php and the plugin uses it instead of the value it syncs. Rotations in Sectora are then not applied automatically: set SECTORA_SHIELD_SECRET_PREVIOUS to the old value while you switch over.
How does secret rotation work?
Rotate from the site’s WordPress page in Sectora. 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. No request is rejected during the switch. The .htaccess rule is updated automatically, and the plugin confirms only once the rule holds the new secret. On nginx, paste the updated snippet, reload nginx and click Confirm rotation; Shield keeps the current secret until you do.
My host does not use .htaccess and I cannot edit nginx.
Then only the PHP layer is possible and the site shows Partial. Pages, logins, the REST API and admin-ajax are protected; static files and plugin files requested directly are not.
What happens when I deactivate or delete the plugin?
Deactivating removes the must-use plugin and the .htaccess rule, so nothing is refused any more. The connection is kept for when you reactivate. Deleting the plugin also revokes the token and deletes its settings.
Screenshots
Changelog
0.1.1
- New name, Sectora Security, and a description of what the firewall protects. No change to how the plugin works.
0.1.0
- First release: connect, origin lock (PHP and server layers), real client IP, Verify, onboarding checklist.



