{
    "title": "How to secure the WordPress login page: the complete guide",
    "seo_title": "Secure the WordPress login page: the complete guide",
    "h1": "How to secure the WordPress login page: the complete guide",
    "description": "Passwords, 2FA, login attempt limits, a moved URL, XML-RPC: the 7 protections for the WordPress login, ranked by priority and by type of site.",
    "lead": "The seven protections for the WordPress login page, ranked by priority, with the right setup for each type of site and the mistakes that lock you out.",
    "language": "en",
    "locale": "en-US",
    "type": "article",
    "url": "https://www.wp-feint.com/secure-wordpress-login-page/",
    "canonical": "https://www.wp-feint.com/secure-wordpress-login-page/",
    "markdown": "https://www.wp-feint.com/secure-wordpress-login-page/index.md",
    "json": "https://www.wp-feint.com/secure-wordpress-login-page/index.json",
    "published": "2026-06-07T06:00:00+00:00",
    "modified": "2026-11-23T09:52:34+00:00",
    "site": {
        "name": "WP Feint",
        "url": "https://www.wp-feint.com/"
    },
    "translations": [
        {
            "language": "en",
            "hreflang": "en-US",
            "title": "How to secure the WordPress login page: the complete guide",
            "url": "https://www.wp-feint.com/secure-wordpress-login-page/",
            "markdown": "https://www.wp-feint.com/secure-wordpress-login-page/index.md",
            "json": "https://www.wp-feint.com/secure-wordpress-login-page/index.json"
        },
        {
            "language": "fr",
            "hreflang": "fr-FR",
            "title": "Comment sécuriser la page de connexion WordPress : le guide complet",
            "url": "https://www.wp-feint.com/fr/securiser-page-connexion-wordpress/",
            "markdown": "https://www.wp-feint.com/fr/securiser-page-connexion-wordpress/index.md",
            "json": "https://www.wp-feint.com/fr/securiser-page-connexion-wordpress/index.json"
        },
        {
            "language": "es",
            "hreflang": "es-ES",
            "title": "Cómo proteger la página de acceso de WordPress: la guía completa",
            "url": "https://www.wp-feint.com/es/proteger-pagina-acceso-wordpress/",
            "markdown": "https://www.wp-feint.com/es/proteger-pagina-acceso-wordpress/index.md",
            "json": "https://www.wp-feint.com/es/proteger-pagina-acceso-wordpress/index.json"
        },
        {
            "language": "de",
            "hreflang": "de-DE",
            "title": "WordPress-Anmeldeseite absichern: der komplette Leitfaden",
            "url": "https://www.wp-feint.com/de/wordpress-login-seite-absichern/",
            "markdown": "https://www.wp-feint.com/de/wordpress-login-seite-absichern/index.md",
            "json": "https://www.wp-feint.com/de/wordpress-login-seite-absichern/index.json"
        },
        {
            "language": "it",
            "hreflang": "it-IT",
            "title": "Come proteggere la pagina di login di WordPress: la guida completa",
            "url": "https://www.wp-feint.com/it/proteggere-pagina-login-wordpress/",
            "markdown": "https://www.wp-feint.com/it/proteggere-pagina-login-wordpress/index.md",
            "json": "https://www.wp-feint.com/it/proteggere-pagina-login-wordpress/index.json"
        },
        {
            "language": "pt",
            "hreflang": "pt-BR",
            "title": "Como proteger a página de login do WordPress: o guia completo",
            "url": "https://www.wp-feint.com/pt/proteger-pagina-login-wordpress-guia/",
            "markdown": "https://www.wp-feint.com/pt/proteger-pagina-login-wordpress-guia/index.md",
            "json": "https://www.wp-feint.com/pt/proteger-pagina-login-wordpress-guia/index.json"
        },
        {
            "language": "nl",
            "hreflang": "nl-NL",
            "title": "De WordPress-inlogpagina beveiligen: de complete gids",
            "url": "https://www.wp-feint.com/nl/wordpress-inlogpagina-beveiligen/",
            "markdown": "https://www.wp-feint.com/nl/wordpress-inlogpagina-beveiligen/index.md",
            "json": "https://www.wp-feint.com/nl/wordpress-inlogpagina-beveiligen/index.json"
        }
    ],
    "headings": [
        {
            "level": 1,
            "text": "How to secure the WordPress login page: the complete guide"
        },
        {
            "level": 2,
            "text": "Why the login is the most attacked door"
        },
        {
            "level": 2,
            "text": "The seven measures, in order of priority"
        },
        {
            "level": 3,
            "text": "1. Long, unique passwords that are never reused"
        },
        {
            "level": 3,
            "text": "2. Two-factor authentication for sensitive accounts"
        },
        {
            "level": 3,
            "text": "3. Limit login attempts"
        },
        {
            "level": 3,
            "text": "4. Move the login URL"
        },
        {
            "level": 3,
            "text": "5. Turn off XML-RPC and the access points you don’t use"
        },
        {
            "level": 3,
            "text": "6. Don’t hand out your usernames"
        },
        {
            "level": 3,
            "text": "7. Keep a record of logins"
        },
        {
            "level": 2,
            "text": "The path of a login attempt"
        },
        {
            "level": 2,
            "text": "Which setup for which site?"
        },
        {
            "level": 2,
            "text": "The mistakes that lock you out"
        },
        {
            "level": 2,
            "text": "The login with WP Feint"
        },
        {
            "level": 3,
            "text": "Key takeaways"
        },
        {
            "level": 2,
            "text": "Frequently asked questions"
        },
        {
            "level": 2,
            "text": "Protect your login page in a few minutes"
        },
        {
            "level": 2,
            "text": "Sources"
        }
    ],
    "body": "To secure the WordPress login page, stack seven protections in this order: long, unique passwords, two-factor authentication for every account that publishes or administers, a cap on login attempts, a login URL that is no longer `wp-login.php`, XML-RPC switched off, usernames nobody can guess, and finally a login log. Each one blocks a different attack; none is enough on its own. This guide gives you the order of priority, the right settings for each type of site and how to avoid locking yourself out.\n\nWe have already written a dedicated article on each measure. This one is the big picture: where to start, what to combine and what to skip depending on your site.\n\n## Why the login is the most attacked door\n\nThe login form is identical on every WordPress site, at the same URL, and WordPress does not limit login attempts by default. A [brute force](https://www.wp-feint.com/glossary/brute-force-attack/) bot therefore needs no research at all: it sends username and password pairs taken from dictionaries or data breaches, thousands of times a day. It is not targeting your site in particular, it is targeting every site.\n\nThe login does not have just one door. Here are the entry points bots try, and the defence that closes each one:\n\n| Entry point | What the bot tries | Main defence |\n| --- | --- | --- |\n| `wp-login.php` | Password guesses in a row | Attempt limiting, 2FA, moved URL |\n| `xmlrpc.php` | Hundreds of guesses per request (`system.multicall`) | Turn off XML-RPC |\n| `/?author=1`, `/wp-json/wp/v2/users` | Harvesting usernames | Hide authors |\n| Lost password | Flooding inboxes, testing email addresses | Limiting, moved URL |\n| Application passwords | Bypassing 2FA through the API | Turn them off if you don’t use them |\n\n*The five authentication entry points a WordPress site exposes by default.*\n\n## The seven measures, in order of priority\n\nThe order follows the ratio between effort and risk avoided. The first two protect you even against an attacker who knows your login URL and your username; the others cut the volume of attacks and what bots learn about your site.\n\n| Measure | Blocks | Effort | Priority |\n| --- | --- | --- | --- |\n| Long, unique passwords | Dictionaries, leaks | Low | 1 |\n| Two-factor authentication | Stolen or guessed password | Medium | 1 |\n| Attempt limiting | Repeated brute force | Low | 2 |\n| Moved login URL | Generic bots, noise | Low | 2 |\n| XML-RPC turned off | Batched guesses | Low | 2 |\n| Hidden usernames | Account discovery | Low | 3 |\n| Login log | Attacks that go unnoticed | Low | 3 |\n\n*Priority 1: do it today. Priority 3: do it once everything else is in place.*\n\n![The layers protecting the WordPress login, from outside in: moved URL and XML-RPC turned off against generic bots, attempt limiting against brute force, long unique password against dictionaries and leaks, two-factor authentication against a stolen password, login log to spot what got through.](https://www.wp-feint.com/media/couches-connexion-en.webp)\n\n### 1. Long, unique passwords that are never reused\n\nNIST, in its SP 800-63B guideline revised in 2025, asks for at least 15 characters for a password used on its own, no forced composition rules, and a check against lists of already leaked passwords. Reuse is the real danger: a password that leaked somewhere else will be tried on your site, which is [credential stuffing](https://www.wp-feint.com/credential-stuffing-password-leaks/). A password manager solves the problem for the whole team. Since WordPress 6.8, passwords are stored with bcrypt, which slows down an attacker who steals the database, but does nothing for a weak password typed into the form.\n\n### 2. Two-factor authentication for sensitive accounts\n\nWith a one-time code generated by an app (TOTP), a stolen password is no longer enough. WordPress does not include it: you need a plugin. Make it mandatory for administrators and editors, set up backup codes, and be wary of codes sent by SMS or email, which are easier to intercept. The methods in detail, passkeys included, are covered in our guide to [choosing and rolling out two-factor authentication](https://www.wp-feint.com/wordpress-two-factor-authentication/).\n\n### 3. Limit login attempts\n\nBlocking an IP address after a few failures makes brute force too slow to succeed. The usual setting: 5 failures in 15 minutes, then a lockout that gets longer for repeat offenders. Two traps: behind Cloudflare or a proxy, the plugin must read the visitor’s real address, otherwise it blocks everyone; and locking by username rather than by IP lets anyone lock you out of your own account. Thresholds and false positives are covered in [how to limit login attempts](https://www.wp-feint.com/limit-login-attempts-wordpress/).\n\n### 4. Move the login URL\n\nWhen `wp-login.php` returns a 404, generic bots move on to the next site: less load, readable logs. The measure does not protect an account whose password has leaked, it cuts the volume. For it to hold, `/wp-admin/` must not redirect anonymous visitors to the new URL, and the login page must stay out of the cache. The pitfalls (WooCommerce, lost password, caching) are in [changing the wp-login.php URL](https://www.wp-feint.com/change-wp-login-url/).\n\n### 5. Turn off XML-RPC and the access points you don’t use\n\n`xmlrpc.php` accepts hundreds of password guesses in a single request. If you use neither Jetpack nor an old publishing app, turn it off completely (see [disabling XML-RPC](https://www.wp-feint.com/wordpress-xml-rpc-risks/)). Do the same check for application passwords: they open the REST API without two-factor authentication, useful for an integration, pointless otherwise.\n\n### 6. Don’t hand out your usernames\n\nBy default, `/?author=1` redirects to a URL that contains the author’s username, the REST API lists authors, and the login error message tells you whether a username exists. An attacker who knows the username only has to guess the password. Use a login username that differs from the display name and hide authors (see [preventing user enumeration](https://www.wp-feint.com/wordpress-user-enumeration/)).\n\n### 7. Keep a record of logins\n\nA log of successful and failed logins, with IP address and time, flags what the other measures did not stop: an administrator login at 3 a.m. from an unfamiliar country, an account created for no reason. An email alert on every administrator login is enough on a small site.\n\n## The path of a login attempt\n\nEach layer stops a different type of attacker. The animation follows three visitors: a generic bot, an attacker who knows the new URL, and you.\n\n*Each layer stops a different kind of attacker: it is the combination that protects you.*\n\n## Which setup for which site?\n\nNot every measure carries the same weight on every site. Start with the row that looks like yours:\n\n| Type of site | Essential | Recommended | Watch out for |\n| --- | --- | --- | --- |\n| Blog, single administrator | Unique password, 2FA | Moved URL, XML-RPC off | Keeping the backup codes |\n| Business site, several authors | 2FA required by role, limiting | Login log, hidden authors | Accounts of former contractors |\n| WooCommerce store | 2FA for the team, limiting | Moved admin login URL | The customer login on “My account” stays public |\n| Agency, many sites | 2FA, limiting, named accounts | Same settings exported to every site | No username shared between colleagues |\n\n*On a store, the customer form must stay reachable: protect it with limiting, not by hiding it.*\n\n## The mistakes that lock you out\n\n- **Forgetting the new URL**: save it in your password manager before you activate it, and test it in a private window.\n- **Losing your 2FA phone** without backup codes: print them or store them in the team vault.\n- **Locking yourself out** through attempt limiting behind a misconfigured proxy: check in the log that the recorded address really is yours.\n- **Caching the login page**: the form token expires and nobody can log in any more. Exclude it from every cache rule.\n- **Stacking two plugins** that move the login or limit attempts: they contradict each other. One plugin per function.\n\nAlways keep an emergency exit: FTP or SFTP access to `wp-config.php`. Most security plugins provide a constant that suspends them while you regain control. To go further on the server side (protecting `wp-admin` by IP address or HTTP password), see protecting wp-admin at server level.\n\n## The login with WP Feint\n\nWP Feint covers most of these measures in a single setting, without touching core files:\n\n- **Free version**: custom login URL, tested before activation; `wp-login.php` and `wp-admin` invisible to logged-out visitors; XML-RPC and pingbacks blocked; bots probing for vulnerabilities counted.\n- **Pro**: login attempt limiting, app-based two-factor authentication with backup codes and enforcement by role, hidden authors (`/?author=`, REST API, sitemaps), administrator activity log and email alerts.\n- **Emergency exit**: the line `define('CMS_FEINT_DISABLE', true);` in `wp-config.php` suspends every transformation and restores `wp-login.php`; `define('WFP_DISABLE_2FA', true);` suspends Pro’s two-factor authentication.\n\nWP Feint is not a firewall, an antivirus or a backup: pair it with an off-site copy of your data and, if needed, a web application firewall. How the hidden page works is described on [the WP Feint custom login page](https://www.wp-feint.com/features/custom-login-page/).\n\n*Wordfence, two minutes: turning on app-based two-factor authentication, seen from the user’s side. Useful for showing a team what to expect before you make it mandatory.*\n\n### Key takeaways\n\n- Unique passwords and two-factor authentication first: they are the only measures that hold against an attacker who knows your URL and your username.\n- Attempt limiting, a moved URL and XML-RPC turned off cut the volume of attacks and the load on the server.\n- Don’t hide a store’s customer login form: limit it.\n- One plugin per function, login page kept out of the cache, emergency exit in `wp-config.php`.\n- A login log reveals what the other layers did not stop.\n\n## Frequently asked questions\n\n**Is changing the login URL enough to secure WordPress?**\n\nNo. It gets rid of most generic bots and lightens the load on the server, but an attacker who finds the URL or holds a leaked password still gets in. Combine it with attempt limiting and two-factor authentication.\n\n**How many login attempts should you allow?**\n\nFive failures in fifteen minutes, followed by an IP lockout that gets longer for repeat offenders, suits most sites. Lock by IP address rather than by username, so that a stranger cannot lock you out of your account.\n\n**Is a CAPTCHA on the login page worth it?**\n\nIt slows down simple bots, but it annoys users and stops neither a stolen password nor XML-RPC. Attempt limiting and two-factor authentication do more with less friction; a CAPTCHA mostly makes sense on a heavily targeted public form.\n\n**Should two-factor authentication be mandatory for every user?**\n\nNot necessarily. Enforce it for the roles that can publish, install plugins or manage accounts (administrator, editor, shop manager). For subscribers or customers, offer it without requiring it.\n\n**What should I do if I’m locked out of my site?**\n\nConnect over FTP or SFTP and add your plugin’s emergency constant to `wp-config.php`, or rename its folder in `wp-content/plugins`. With WP Feint, `define('CMS_FEINT_DISABLE', true);` restores `wp-login.php`. Remove the line once the problem is fixed.\n\n## Protect your login page in a few minutes\n\nThe free version moves the login, hides `wp-login.php` and `wp-admin` and turns off XML-RPC. Pro adds login attempt limiting, two-factor authentication by role, the activity log and alerts.\n\n[Download the free version](https://www.wp-feint.com/download/)\n\n[See Pro pricing](https://www.wp-feint.com/pricing/)\n\n## Sources\n\n- WordPress Developer Resources: Brute Force Attacks (https://developer.wordpress.org/advanced-administration/security/brute-force/)\n- WordPress Developer Resources: Hardening WordPress (https://developer.wordpress.org/advanced-administration/security/hardening/)\n- OWASP: Authentication Cheat Sheet (https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)\n- NIST SP 800-63B: Authentication and Authenticator Management (https://pages.nist.gov/800-63-4/sp800-63b.html)",
    "categories": [
        "Attacks and brute force"
    ],
    "format": "application/json"
}