| 开发者 | wpformation |
|---|---|
| 更新时间 | 2026年11月1日 11:03 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-login.php with a private slug and return a 404 or redirect blocked visitors to a chosen URL.wp-login.php par un slug privé et renvoie une 404 ou redirige les visiteurs bloqués vers l'URL choisie.login-armor directory to /wp-content/plugins/my-login)wp login-armor status prints your login URL and changes nothinglogin_armor_hide_slug row of the wp_options table holds the slug, and your login URL is your site address followed by /slug/ (or by /?slug when your permalinks are set to Plain)wp option update login_armor_hide_enabled 0. Deleting the login_armor_hide_slug row (or wp option delete login_armor_hide_slug), the method older versions gave, now has the same effect: wp-login.php answers again, and you choose a new URL from the settings once you are back inwp login-armor rescue from your server shell: it lists every way back in, and changes nothing until you add --yesdefine( 'LOGIN_ARMOR_SAFE_MODE', true ); to wp-config.php. wp-login.php is served again, two-factor is not required, the request firewall and the bot challenge only log, single-session enforcement pauses, and Force HTTPS enforces nothing. Your settings are untouched, brute-force lockouts stay active, and everything comes back the moment you delete the line.wp option patch update login_armor_hardening force_https false (write false or 0, nothing else: WordPress reads off and no as ON)define( 'LOGIN_ARMOR_SAFE_MODE', true ); to wp-config.php. All four effects stop at once, the toggle keeps saying what you chose, and enforcement comes back on the first request after you delete the line.force_ssl_admin(), the Secure flag it put on the two authentication cookies, and the fact that a request forwarded by one of your declared proxies counted as HTTPS for the length of that request. It changes nothing else.
Two things it cannot take back, because they were never a setting of this plugin. If your site sends a Strict-Transport-Security header, this option is what made that header effective behind a proxy, and every browser that already received it keeps the pin for the header's own duration, with the option on or off. And the redirect itself is sent with no-cache headers so that a CDN or a page cache does not keep serving it, but a cache that ignores those headers may still need to be purged. Your site address, your .htaccess, the FORCE_SSL_ADMIN constant in wp-config.php and any Strict-Transport-Security header stay exactly as they were. So if WordPress still sends the admin to https after you switch the toggle off, it is because the site address is already an https:// one or because FORCE_SSL_ADMIN is defined in wp-config.php, and neither of those belongs to this plugin.Hide Login should not: when you switch it on, it offers to email the new URL to the site address, and wp login-armor status prints it at any time from SSH. Deleting the slug from the database turns Hide Login off and gives you wp-login.php back, and wp login-armor rescue prints every way back in without changing anything.
One option can, and it says so on its own row: Force HTTPS. It is off by default, it is never switched on by the safe baseline, and the plugin refuses to switch it on from a connection that is not already HTTPS. It also stands down by itself, and tells you so in the admin, if the proxy in front of your site starts reporting HTTPS from an address you have not listed in Trusted proxy IPs, which is what happens when a CDN or a load balancer changes address. If you still end up locked out, one command puts it back: wp option patch update login_armor_hardening force_https false.
If you cannot reach a shell either, there is a break-glass switch: add define( 'LOGIN_ARMOR_SAFE_MODE', true ); to wp-config.php. wp-login.php answers again, the second factor is not demanded, the request firewall and the bot challenge drop back to logging only, and Force HTTPS stops enforcing all four of its effects, without any setting being rewritten. It is a constant and not an option, so it cannot be flipped from the database, and it is read once, while the plugin file loads: only code that runs before that can arm it, which means wp-config.php, a must-use plugin, or a plugin that loads earlier. A theme, or anything running on a WordPress hook, cannot, because by then the answer is already fixed. Brute-force lockouts are deliberately left running: clear your own address from the admin notice, or with wp login-armor rescue --ip=<your ip> --yes, which also lifts a blocked network that contains it. Delete the line to restore full protection. The "Block subnet" button refuses the network your own address belongs to.
No. Everything is lazy-loaded and indexed. On a normal login flow the extra SQL cost is under 2 ms.
Yes. Choose the proxy header in Settings and list the exact IP addresses or CIDR ranges of the proxies that are allowed to supply it. Forwarding headers are ignored when the immediate network peer is not explicitly trusted.
Yes, subdomain and subfolder. Each site has its own modules, logs, and thresholds.
Yes. Since 2.8.3 the root .htaccess rules go where the server applies them: the directory the site is served from (web/ under Bedrock), next to WordPress's own rewrite rules, rather than WordPress's directory (web/wp/). Under Bedrock, the safe-mode constant is set with Config::define( 'LOGIN_ARMOR_SAFE_MODE', true ); in config/application.php.
Login Armor does not rotate your security keys: under Bedrock they live in .env and belong to your deployment. Know before you rotate them that it signs everyone out, and that the authenticator-app secrets are encrypted with AUTH_KEY: after a new AUTH_KEY, users sign in with a backup code, or an administrator runs wp login-armor 2fa reset <user> --yes and they enrol again. The Activity Log notices the change of keys; wp login-armor activity reset-chain starts a new baseline.
Yes. It was checked on a clone of a real headless back end (Nginx, Redis object cache, a Next.js front end reading the REST API). The hidden login URL, two-factor and brute-force lockouts protect the back office, while the public REST API, application passwords (previews, publishing scripts, MCP connectors) and revalidation webhooks keep working, even from an address that is locked out of the login form. Turn on headless mode (Settings > Headless back end). It keeps "Restrict REST API" and "Disable application passwords" off, the two settings that close what your front end reads and refuse what your scripts write with, whether the change comes from the screen, an import or WP-CLI. The Request Firewall never inspects REST requests, so it leaves your API alone, even in blocking mode, and it does not protect it either. Only its "Bad user agents" family blocks pages outside the REST API (feeds, the sitemap) when curl or python request them. Failed application passwords are logged and shown as their own incident, "Application password refused". Only unknown accounts count toward the lockout: an application password cannot be guessed, while a script holding a revoked one would otherwise lock your own address. Login Armor also records which networks each application password is used from, and alerts you the first time one is used from a hosting provider it has never been used from; you approve the network from the user's profile if it is one of your services. On a multisite network, a site administrator cannot approve the network of a password that belongs to another account, because WordPress requires the "manage_network_users" capability to edit another profile: a super administrator can, and everyone can on their own profile. If fail2ban watches the hidden login URL, count HTTP 429 too: it is what Login Armor answers once it locks an address. Do not add a fail2ban jail on the 401 answers of the REST API: it would ban the cloud addresses your front end reads from, for the whole site.
Yes. The Activity Log can forward every entry to an HTTPS endpoint you own (Settings > Activity Log): signed JSON (HMAC-SHA256), queued and retried, with the integrity-chain hashes so that your collector can verify the journal even if the local database is wiped. Alerts (incidents, lockouts, administrator accounts) go by email, Slack, Discord or webhook. The Events and Activity lists export to CSV, and every login attempt fires the login_armor_log_recorded action, which a must-use plugin can send to syslog or a SIEM.
Yes. Turn on "Write failures and lockouts to the system log" (Settings > Brute force). Each failed login that counts toward the lockout, and each lockout, then writes one line under the identity login-armor, facility auth: auth_failure ip=<address> vector=<form|xmlrpc|rest|other> reason=<code> and lockout ip=<address> level=<1|2>. Never the login typed. A wrong application password of an existing account is not counted, so fail2ban never bans your own scripts. Filter (/etc/fail2ban/filter.d/login-armor.conf): [Definition] then failregex = login-armor\[\d+\]: (?:auth_failure|lockout) ip=<HOST>. Jail, with the systemd journal: [login-armor], enabled = true, backend = systemd, journalmatch = SYSLOG_IDENTIFIER=login-armor, maxretry = 5, findtime = 600, bantime = 3600; with a log file instead of the journal, logpath = /var/log/auth.log. Setting up fail2ban is done as root on the server, and LoginArmor's allow list does not stop fail2ban: add your own addresses to ignoreip.
Yes, but disable overlapping modules on one side to avoid double lockouts. With WPS Hide Login or Rename wp-login.php, whose only job is hiding the login page, LoginArmor refuses to switch its own hidden login address on, and stands down with a notice if both end up active: never two hidden addresses at once.
Up to five custom tables in your own database: login events, brute-force attempts, incidents, and, when you switch the Activity Log on, its journal and its forwarding queue. Nothing leaves your server unless you enable a feature that says it does.
Settings > Export downloads every setting as a JSON file (webhook URLs only if you tick the box; the SIEM signing secret and users' two-factor enrolments never leave the site). On the other site, Settings > Import shows you every change first and applies nothing until you confirm. From the command line: wp login-armor settings export --file=model.json, then wp login-armor settings import model.json --dry-run and --yes. One invalid value refuses the whole file, and a firewall or bot challenge switched on by import always starts in monitor mode.
They sit next to a .htaccess file that Login Armor writes into, in wp-content/uploads or at the root of the site. The .bak file is your restore point: a copy of the file as it was, taken once before the very first change and never overwritten afterwards. The .lock file is empty; it exists only to stop two requests writing the same file at the same moment. Both names start with .ht, so a web server configured for WordPress never serves them to a visitor. Both are deliberately left in place when you uninstall the plugin: a backup that disappears with the plugin is not a backup. The rules themselves are not: deactivating Login Armor takes its blocks out of the .htaccess files (and puts them back when you reactivate it), and deleting the plugin removes them for good. Your own rules around them are never touched.
Not currently. LoginArmor is fully free and open source. GPL forever.
Support forum: wordpress.org/support/plugin/login-armor/.
wp option update with the string "false" switched a module ON. Boolean settings are now stored as 1 or 0; on update, a stored "false" is kept as what the site was doing (logged in the Activity Log), and "false" switches off from then on.define( 'LOGIN_ARMOR_CLI_HIDE_SLUG', true ); keeps the hidden address out of wp login-armor status (shown with --show-slug).