| 开发者 | nhrrob |
|---|---|
| 更新时间 | 2026年10月16日 20:27 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-config.php or one WP-CLI command (see the FAQ).
Key Features
Dashboard
admin username, open registration, HTTPS, debug output, secret keys, PHP version, file permissions, exposed files and more.wp_ table prefix, can be acknowledged with a note: it stops counting in the score and in Site Health, stays listed with who acknowledged it and when, and counts again as soon as the finding changes.wp-login.php and wp-admin then answer "Not found" to anyone who is not signed in. The new address is tested and emailed to you before it takes effect.[nhrrob_secure_2fa] shortcode and WooCommerce's "Account details" page let customers and members enrol..php, .env, backups) is locked out of the public site; the sign-in form stays reachable. Broken links, missing images and requests triggered from other websites do not count.debug.log, readme files (WordPress's own readme.html and license.txt included) and the uploads folder from your own site and shows what came back. On Apache and LiteSpeed it can add the rules for you; on nginx it shows the lines to add.wp-config.php after a suspected break-in, which signs everyone out. The new file is checked before it replaces the old one, and the old one is put back if the site does not answer..htaccess, .user.ini and wp-config.php are checked for injected rules and code, and must-use plugins and drop-ins are listed.wp-content. Findings can be viewed and quarantined (renamed so they cannot run) and restored. Nothing is deleted.wp nhrrob-secure status --format=json for scripts).nhrrob-secure folder to /wp-content/plugins/, or install it from Plugins → Add New.Add this line to wp-config.php, above the line that says "That's all, stop editing":
define( 'NHRROB_SECURE_SAFE_MODE', true );
Safe mode pauses the moved login address, lockouts, the request filter, address and country rules and the two-factor step, and leaves your settings as they are. Sign in at wp-login.php, fix the setting, then remove the line.
With WP-CLI you can also run wp nhrrob-secure safe-mode on, wp nhrrob-secure unlock --all, wp nhrrob-secure login-url reset or wp nhrrob-secure reset-2fa <user>.
Under Tools → Secure.
Limiting login attempts and generic sign-in errors are on. Everything that could lock you out or block a visitor (the moved login address, two-factor, the request filter, address and country rules, hardening switches) is off until you turn it on.
Your settings are kept, including a moved login address and your users' two-factor setup. Two things change on purpose: the old "advanced firewall" is replaced by a smaller request filter that starts in log-only mode, and country rules now apply to the sign-in page unless you choose the whole site. The audit table from 1.x is copied into the new activity log and removed. The settings screen moved to Tools → Secure.
Yes. It uses the standard time-based codes (TOTP) that Google Authenticator, Microsoft Authenticator, Authy, 1Password, Bitwarden and others support. The QR code is drawn in your browser; the secret is never sent to an outside service.
They can sign in with one of their recovery codes. Otherwise an administrator can reset their two-factor under Tools → Secure → Users & Sessions, or with wp nhrrob-secure reset-2fa <user>.
A file that exists is handed out by the web server before WordPress loads, so a plugin cannot guard it from PHP. On Apache and LiteSpeed, switch on "Protect these files". On nginx, add the lines shown on the Hardening screen to your server configuration, or send them to your host.
It is off by default and starts in log-only mode. It looks at the address of a request, and only for visitors who are not signed in. Checking submitted forms is a separate switch that uses only the rules normal writing cannot trigger. Check the list of matches for about a week, allow anything that is yours, then switch it to Block.
Yes. Each site has its own settings, and Network Admin → Settings → Secure shows every site's score in one table and can copy one site's settings to all the others. Actions that change files or end everyone's sessions need a network administrator.
No. A passkey is the second step after the password, like a code from an authenticator app. It needs HTTPS. Recovery codes work when the passkey is not at hand.
Put the [nhrrob_secure_2fa] shortcode on any page. With WooCommerce it also appears under My account → Account details.
Yes, on WordPress 6.9 or later. The plugin registers three abilities with the WordPress Abilities API: nhrrob-secure/get-security-status (score, checks, counts), nhrrob-secure/list-vulnerabilities (the last vulnerability check) and nhrrob-secure/apply-fix, which fixes one failed check by switching on the setting behind it: XML-RPC off, usernames hidden, file editor off, login attempts limited, or file protection rules written to .htaccess. All need an administrator. An agent can only switch these protections on, never off, and cannot unlock an address, run a scan or choose a file; it is never given the login address, your address rules, usernames, visitor addresses or the activity log. To use the abilities over MCP, install the WordPress MCP Adapter plugin; this plugin does not bundle it.
PHP 7.4 and every later version. Each change is tested on PHP 7.4 through 8.5, and on the upcoming 8.6.
No. Version 1.x created one table; 2.0 moves its contents into the activity log and removes it.
wp_ table prefix, with an optional note. It stops counting in the score and in Site Health, stays listed with who acknowledged it and when, can be undone, is recorded in the activity log, and counts again as soon as the finding changes.nhrrob-secure/apply-fix ability for AI agents and MCP clients. It fixes one failed check by switching on the setting behind it (XML-RPC off, usernames hidden, file editor off, login attempts limited, file protection). It can only switch protection on, never off.readme.html and license.txt, which give its version away. Sites with file protection on get the new rule on the first admin visit after updating..htaccess rules are rewritten no longer removes rules that were already working.wp nhrrob-secure status --format=json..htaccess, .user.ini and wp-config.php are checked for injected rules and code; must-use plugins and drop-ins are listed.wp-config.php, with a check of the new file and an automatic restore.NHRROB_SECURE_SAFE_MODE) and WP-CLI commands (wp nhrrob-secure).nhrrob-secure/menu/capability filter is now nhrrob_secure_menu_capability.