跳到内容

Protect WP Login – Password Protect wp-login.php with Basic Auth

v1.1.2

Click.ar · 2024年9月25日 上架

Password protect wp-login.php with HTTP Basic Authentication. Stops bots and brute force attacks at the server, before WordPress even loads.

正在使用
10 以下
评分
暂无
累计下载
1,330
最近更新
2026年10月14日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

截图

Status panel: the protection is active, with the XML-RPC option and the list of users.
Status panel: the protection is active, with the XML-RPC option and the list of users.
The username and password generated on activation stay visible until you confirm you saved them.
The username and password generated on activation stay visible until you confirm you saved them.
A reminder is shown on the dashboard until the generated credentials are saved.
A reminder is shown on the dashboard until the generated credentials are saved.
The browser asks for the extra username and password before showing wp-login.php.
The browser asks for the extra username and password before showing wp-login.php.
After the extra authentication, the usual WordPress login form appears.
After the extra authentication, the usual WordPress login form appears.
Adding a new user. The list shows all the users that can pass the extra authentication.
Adding a new user. The list shows all the users that can pass the extra authentication.
If the hosting doesn't support the rules, they are removed automatically and the panel explains why.
If the hosting doesn't support the rules, they are removed automatically and the panel explains why.

Protect WP Login adds a second password in front of your WordPress login page. Before the login form is shown, the web server asks for an extra username and password (HTTP Basic Authentication through .htaccess). Bots and brute force attacks are rejected by the server, so they never reach WordPress, PHP or your database.

Why protect wp-login.php at the server level?

Every request to wp-login.php loads WordPress and queries the database, even when it comes from a bot trying thousands of passwords. Plugins that limit login attempts or add a CAPTCHA still have to do that work for every attempt. With Protect WP Login the server rejects those requests before WordPress starts:

  • Brute force bots don’t consume PHP or database resources.
  • Attackers never see your login form, so they can’t try WordPress passwords.
  • No CAPTCHA to solve and no extra scripts on the login page.
  • It works together with Wordfence, Limit Login Attempts, two-factor authentication and other security plugins: it’s one more layer in front of them.

Features

  • Password protects wp-login.php with server-level HTTP Basic Authentication.
  • Optionally protects xmlrpc.php, another common target of brute force attacks.
  • Creates a random username and password on activation, and keeps them visible until you confirm you saved them.
  • Checks the protection right after writing the rules. If your hosting doesn’t support them, they are removed automatically so your site keeps working.
  • Status panel that shows whether the protection is really active.
  • Password protected posts keep working for your visitors.
  • Unlimited users, managed from the WordPress admin.
  • Translated into English, Spanish, German, French, Italian and Portuguese.

How it works

  1. A visitor or a bot opens wp-login.php.
  2. The web server asks for the extra username and password managed by the plugin.
  3. Only with the right credentials the usual WordPress login form is shown. Wrong credentials are rejected by the server.

Requirements

  • Apache or LiteSpeed web server with .htaccess support (most shared hosting). On Nginx, the plugin shows the configuration to add to the server.
  • Single site installations. WordPress Multisite is not supported yet.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums