Plugin
Security Hardening
Login limiting, XML-RPC and file editors off, user enumeration stopped, and every security header yours to set. No cloud, no scanner.
/**
Plugin header
- Plugin name:
- Security Hardening – EPAS
- Version:
- 1.0.0
- Requires at least:
- 6.4
- Requires PHP:
- 7.4
- Languages:
- English, Lietuvių
- License:
- GPL-2.0-or-later
- Download size:
- 56 KB
*/
What it does
- Every security header is yours to set: framing (both
X-Frame-Optionsand the modernframe-ancestors), MIME sniffing, six Referrer-Policy choices in plain words, twelve browser features you can deny, the two cross-origin isolation headers,upgrade-insecure-requests, and HSTS with its own lifetime, subdomain and preload switches — with a live panel showing exactly what a visitor receives. - Your own Content-Security-Policy, report-only until you say otherwise. This plugin will not invent one for you: a useful policy is written for one particular site, and a generic one either breaks the page or is theatre.
- Login attempt limiting that cannot strand you: pauses expire by themselves, an allowlist takes priority over everything, a successful login clears the count, and every paused address has a one-click release.
- Generic login errors. WordPress normally confirms that a username exists, which is help for the wrong person.
- XML-RPC and pingbacks off — properly off. The usual
xmlrpc_enabledswitch only refuses the methods that log in; this closes the endpoint itself. - The theme and plugin file editors off, so one compromised admin account cannot rewrite your site's PHP from the dashboard. SFTP still works.
- Username scans blocked.
?author=1returns a 404 instead of redirecting to a real username, and the REST user list is closed to visitors who are not signed in. The block editor is unaffected. - Four security headers —
X-Frame-Options,X-Content-Type-Options,Referrer-Policy,Permissions-Policy— plusStrict-Transport-Securityover HTTPS. The settings screen prints them exactly as they are sent. - It counts against
REMOTE_ADDRonly.X-Forwarded-Foris sent by whoever is making the request, so trusting it would let an attacker dodge the limiter and lock you out by claiming your address. - It stands down for other security plugins. With Wordfence, Solid Security, All-In-One Security, Sucuri or Limit Login Attempts Reloaded active, our limiter switches itself off — two limiters counting each other is how people get locked out of their own sites.
Questions
What is deliberately not in here?
No malware scanner, no file-integrity check, no firewall, no security score — those need somebody else's servers or a read of every file on every request. And no login-page renaming: it stops nothing that can read your HTML, and it is the most common reason people cannot get into their own site.
I locked myself out. What now?
Wait for the pause to expire — fifteen minutes by default — or add define( 'EPAS_SECURITY_DISABLE', true ); to wp-config.php, log in, put your address in the allowlist, and remove the line again. The constant switches off every feature in the plugin, not just the limiter.
Does it work behind Cloudflare or a load balancer?
Most managed hosts and Cloudflare plugins already set REMOTE_ADDR to the real visitor address, in which case yes, out of the box. If yours does not, map the header yourself with the epas_security_client_ip filter — a decision for somebody who knows their own infrastructure, not a default we can guess.
Will switching off XML-RPC break anything?
It breaks the WordPress mobile apps, Jetpack, and a few desktop publishing tools. Nothing else in a normal site uses it. If you need one of those, untick that one box.
Why is there no Content-Security-Policy?
Because a useful one has to list exactly what your site loads. A generic policy either breaks your pages or permits everything, and the second kind is decoration. Add your own through the epas_security_headers filter.
What does it store about visitors?
For addresses that fail to log in: a counter that expires by itself, and — once an address runs out of attempts — a row holding the address, the time and the number of attempts. The last twenty are kept, one button empties the list, and deleting the plugin deletes it. The username that was tried is never stored, because people type passwords into that field.
How to get it
This plugin is finished and being prepared for the WordPress.org plugin directory. Until it is published there, email us and we will send you the current zip.