100% Free · Open Source GPLv2 · Zero setup requiredGet the Plugin

Opens in a new tab
ITX UserOps

Back to Blog

Hiding your WordPress login page is not a security measure

Moving wp-login.php to a secret URL stops the log noise and almost nothing else. It leaves three authentication channels untouched, it is discoverable in about four requests, and it breaks things quietly. Here is what to do instead, in order.

Operations

It is the first advice in almost every WordPress hardening guide: move wp-login.php to /my-secret-door/ so the bots cannot find it.

Your failed-login count drops to nearly zero the same day. The advice appears to work.

It does not. What dropped was the *noise*, and noise is the one thing that was never the risk.

What hiding does not cover

WordPress does not have one front door. It has four, and renaming the login page moves exactly one of them.

ChannelMoved by hiding the login page?
wp-login.phpYes
XML-RPC at xmlrpc.phpNo
REST API with an application passwordNo
An existing session cookieNo

XML-RPC is the one that matters most here, and the reason is arithmetic. system.multicall lets a single HTTP request carry hundreds of credential attempts. An attacker who never touches your login page can try a thousand passwords in a handful of requests, and your renamed login URL is irrelevant to all of them.

So the honest summary of what hiding achieved: it stopped unsophisticated bots from hammering one of four doors, and left the fastest of the four wide open.

It is discoverable anyway

Assume for a moment that wp-login.php were the only door. The new URL is still not secret.

  • Any logged-out request to /wp-admin/ redirects to it. One request, and the redirect_to parameter hands you the location.
  • The password reset email contains it, in full, in plain text.
  • Plugins hardcode it. Membership plugins, WooCommerce templates, "log in" links in themes. Something on your site will link to the real URL, and a crawler will find it.
  • ?rest_route=/wp/v2/users and the author archives confirm which accounts exist, which is the half of the problem that hiding was never addressing.

Fingerprinting a WordPress site takes about four requests. Any attacker running a targeted campaign — the kind you actually care about — finds it before the kettle boils. The only thing you have defeated is a bot with no follow-through, which was going to fail on your password anyway.

What it costs

This is the part the guides leave out. Hiding the login page breaks things, and it breaks them quietly.

  • Password reset links that point at the old URL now 404, and the user assumes the reset failed.
  • WooCommerce /my-account/, membership plugins and any theme login form may each keep their own path.
  • Your own team cannot get in from a bookmark, so someone writes the secret URL in a shared document, which is now the least protected copy of it.
  • Automated deploys and monitoring that check the login page start failing, so somebody disables the check.

Each of these is small. Collectively they are why the secret URL gets shared, written down, and eventually reverted — and why the site ends up with neither the obscurity nor the hardening.

What actually reduces risk

Every item below closes a real path rather than moving one. Roughly in order of return.

1. Stop confirming which accounts exist

Core says "unknown username" for one thing and "the password you entered for the username alice is incorrect" for another. That difference is a free account-enumeration oracle, and it is worth more to an attacker than your login URL.

Replace both with one message that reveals nothing. Then close the other leaks: the REST users endpoint, ?author=1 redirects, oEmbed author names, the author sitemap.

And do not forget the lost-password form — it will happily confirm whether an address is registered while your login page reveals nothing.

2. Rate-limit, per IP and per username

Per-IP counting alone is defeated by any botnet: spread the attempts across a thousand addresses and no single one ever reaches five failures.

Counting per *username* catches the distributed case, because the target is the thing that does not change. You want both, with a lockout window and backoff.

3. Bot defence that costs humans nothing

You do not need a CAPTCHA. Two cheap checks reject most automated submissions:

  • A honeypot field real users never see, which bots autofill.
  • An HMAC-signed render timestamp — bots submit implausibly fast, or forge the token, or omit it.

Two things matter in the implementation. It should judge only the interactive browser form, because REST and XML-RPC never carry those fields. And it must fail open on anything ambiguous — a false rejection here is a real customer being told their correct password is wrong. A page that sat in a tab for an hour is a page that sat in a tab, not an attack.

4. A second factor, and passkeys if you can

Rate limiting makes guessing slow. A second factor makes a correct guess insufficient, which is a different and better property — it covers the case where the password was not guessed at all but reused from a breach somewhere else.

Passkeys are stronger still, because they cannot be phished: the browser will only release the credential to the origin it was registered for. A convincing fake login page gets nothing.

If you do this on a store, read the lockout this causes first.

5. Govern the channel hiding never touched

Application passwords bypass your second factor by design — that is their purpose. So they need their own controls: who may hold one, how long it lives, and revocation of anything unused for months.

Then ask whether your IP allowlist covers the REST API, or only wp-login.php. On most setups it is only the login form, which is an allowlist with a hole in it.

And decide about XML-RPC deliberately. Off entirely if nothing uses it; method-restricted if something does; system.multicall disabled either way.

6. Then, if you like, hide the login page

It is not harmful. It genuinely does cut log volume, and less noise makes real signals easier to see.

Do it last, knowing it is housekeeping rather than a control, and knowing which four things it did not do. The failure mode of hiding-first is not that hiding is bad; it is that the drop in failed logins feels like success, and the work stops there.

A security posture screen scoring the site out of 100, stating that it counts configuration rather than effect, and listing what to change first — each row naming what the change could break before it is made.
A list ordered by what is worth doing next on this site, which is not the same order as a hardening checklist written for somebody else’s.

The measurement that misleads

After hiding, your failed-login count falls off a cliff. It is the most satisfying graph in WordPress security and it means very little.

The number went down because a category of unsophisticated traffic stopped reaching one endpoint. Nothing about your actual exposure changed: the same passwords are still valid, the same accounts still exist, the same three channels still authenticate.

A better question than *how many failed logins did we have* is: if somebody had the right password right now, what would stop them? If the answer is "nothing, but they would have to find the login page first", you have obscurity where a control should be.

The short version

Hiding the login page moves one of four doors, is discoverable in about four requests, breaks password resets and front-end login forms, and reduces the number in a chart rather than the risk behind it.

Do enumeration hardening, rate limiting on both axes, invisible bot defence, a second factor, and governance of application passwords first. Then hide the login page if you want a quieter log.

—

*ITX UserOps deliberately does not offer login-page hiding — the argument above is why. It does ship the rest: login security covers lockouts on both axes, IP and country rules, generic errors and honeypot bot defence; two-factor and passkeys cover the credential itself; application passwords covers the channel none of it reaches. The security posture screen reads your current configuration and names the next safe thing to switch on, which is a better starting point than a hardening checklist written for somebody else's site.*

A clearer WordPress admin
starts here.

Start with the free plugin. Add more control when you need it.

Log in

Vote on ideas, submit your own and join the discussion.