# Change WordPress login URL: quieter logs, not a stronger door

How to change the WordPress login URL with BetterShield, what moving wp-login.php really stops, and why limits, two-factor and passkeys still matter.

By BetterShield Team, Oct 9, 2026. Updated Nov 9, 2026 by Nazmul Hasan Rupok.

If you have searched for how to change WordPress login URL, you have probably seen it described as a security fix. Every WordPress site signs people in at wp-login.php, and automated scripts ask for that address on site after site, so moving it sounds like changing the locks.

It does help, just not in that way. BetterShield's own screen puts it plainly: moving the sign-in address gives you quieter logs, not a stronger door. Scripts that try wp-login.php by name stop reaching your form. Anyone who has the new address meets the same form, the same accounts and the same passwords.

Here is what the change does, what it leaves alone, and how to make it in BetterShield without locking yourself out.

## Quick summary

- Moving the sign-in page makes wp-login.php answer 404, so scripts that ask for it by name never reach the form.
- The intended benefit is less traffic to the default form and potentially fewer resulting lockouts. It is not a substitute for attempt limits, two-factor or passkeys.
- In BetterShield, it is **Custom sign-in address**, under **Signing in** on **Protection › Login & Access**. It checks your way back in first.
- Pair it with **Dashboard privacy for visitors**, so /wp-admin/ does not hand out the new address.
- Keep the address somewhere off the site. If you lose it, your recovery link brings back the standard sign-in page.

## What changing the login URL does

On a standard WordPress site, the sign-in form lives at /wp-login.php, and a signed-out visit to /wp-admin/ is redirected there. Because the address is the same on every site, a script does not need to find your sign-in page. It asks for it by name.

A custom WordPress login URL, often called hiding wp-login.php, takes that address away. With **Custom sign-in address** applied, BetterShield:

- Serves the sign-in page at the address you choose. Signing in, signing out and password resets all work there.
- Answers 404 at wp-login.php, except for signing out, which keeps working from anywhere, and the password form of a password-protected post. On a single site, wp-signup.php and wp-register.php answer 404 too.
- Rewrites normal WordPress sign-in and password-reset links, including new emails. Public signed-out error pages, installer pages and supported form previews do not reveal the chosen address; password-protected post forms keep their original endpoint.
- Stops WordPress redirecting short guesses such as /login and /admin, so they do not give the new address away.

A script that asks for wp-login.php now gets "not found" and never sees the form. That means fewer failed sign-ins in your logs and fewer lockouts to read through.

## What it does not do

The door is the same door. Your accounts and passwords are unchanged, and anyone who learns the new address can try them there. An address is not a secret the way a password is: it sits in bookmarks, browser history and the emails WordPress sends.

It also leaves other ways in alone. xmlrpc.php accepts a username and password too, and application passwords let tools sign in without the second factor, by design. Each has its own fix: **Remote publishing block (XML-RPC)** (see [Turn off remote publishing (XML-RPC) in WordPress](/blog/disable-xml-rpc-wordpress/)) and **App password block**.

BetterShield also offers controls that reduce the risk from password guessing:

- **Sign-in attempt limits**, on **Protection › Login & Access**, is on by default: five wrong passwords from one connection within 15 minutes pause sign-in from it for 15 minutes. It counts wrong passwords at the password check itself, not at one address, so moving the form changes nothing about it. See [Limit login attempts in WordPress](/blog/limit-login-attempts-wordpress/).
- Two-factor sign-in, set up on **Protection › Two-Factor**, asks for a six-digit code from an app after the password, so a stolen password is not enough. A passkey signs you in with your fingerprint, face or device PIN. See [WordPress two-factor authentication](/blog/wordpress-two-factor-authentication/) and [Two-factor and passkeys](/docs/two-factor-and-passkeys/).

Set those up first. Move the address afterward, if quieter logs are worth it to you.

## How to change the WordPress login URL with BetterShield

Both fixes in this guide are free, off by default, and listed under **Signing in** on **BetterShield › Protection › Login & Access**.

### Check your way back in first

Before any **Signing in** fix applies, BetterShield checks for a working recovery link or an unused printed recovery code, and that your recovery options were checked within the last day. If that fails, **Check the way back in first** says why and offers **Check now** or **Open Recovery**. **Go ahead anyway** is there too, and is recorded in the activity log.

To pass, open **Protection › Recovery**, make sure you have a fresh link or printed codes, and press **Check readiness now**. The [Locked out](/docs/locked-out/) guide covers both.

### Change the sign-in address

1. On **Protection › Login & Access**, find **Custom sign-in address** under **Signing in**.
2. Type your **New sign-in address**: 1 to 200 letters, numbers, dashes and underscores, stored in lowercase. Names WordPress already uses, such as wp-admin, admin, feed or search, are refused, and so is an address where a page, post, category or tag already lives.
3. Press **Preview the change**. It checks the address and names the exact sign-in address it would produce. Nothing changes yet.
4. Turn the switch on. The card shows the new address with a **Copy** button, and the row reads **On since** and **Undo never expires**.
5. Save the address somewhere off the site, such as a password manager, and tell anyone else who signs in.

With plain permalinks, the address looks like example.com/?side-door rather than example.com/side-door/. The preview shows which one you get.

Read the notes on the card. If one names a caching plugin, exclude the new address from its page cache. During a supported migration, BetterShield can share the same address with the source plugin. Keep that address until the handover finishes; a different address is refused while the other plugin serves it. See [Switch from WPS Hide Login](/docs/switch-from-wps-hide-login/) for the preview and its limits. On multisite, the address changes for that site only.

To undo, turn the switch off. The fix writes no files and adds no rewrite rules, so wp-login.php answers again straight away.

### Or try it with Monitor first

**Try It in Test Mode** watches real requests without blocking anything. Here, it counts the requests to wp-login.php that the change would have answered with 404.

1. Type the address, choose a **New observation window** (**1 hour**, **24 hours** or **7 days**), and press **Start monitoring with the fields above**.
2. When the window ends, read the counts and press **Enforce reviewed settings**. It applies the address saved with the window and needs a working recovery link or printed codes. Undo still works.

Bots and people both show up in the count, so it shows how much traffic the move would touch, not who sent it. A match is not proof of breakage, and no matches is not proof of safety.

### Add Hide the dashboard from visitors

WordPress normally sends a signed-out visitor who asks for /wp-admin/ to the sign-in page. In BetterShield 1.1.7, the custom-address row also asks what those visitors should see. **See page not found** is selected by default and turns on **Dashboard privacy for visitors** in the same save. If that save enabled dashboard privacy, undoing the address turns it off too. An already-on dashboard-privacy setting is preserved; **Go to the sign-in page** does not turn that existing protection off.

**Dashboard privacy for visitors**, in the same group, closes the gap. A signed-out visitor who asks for a dashboard page gets a 404 by default. **Send signed-out visitors to** can instead name a local destination, without the domain; leave it empty for page not found. Signed-in users reach the dashboard as before. admin-ajax.php and admin-post.php keep working for front-end features, and the dashboard itself is not renamed, so signed-in users reach it exactly as before.

The same recovery check runs before it applies, and **Try It in Test Mode** works for it too.

## Doing it from WP-CLI

The same fixes are available through `wp bettershield harden`. A command that changes the site needs `--user=`, naming an account that can manage BetterShield.

```
wp bettershield harden login_url --dry-run
wp bettershield harden login_url --slug=side-door --user=admin
wp bettershield harden admin_gate --user=admin
```

`--dry-run` describes what applying would do and changes nothing. After applying, the command prints a reminder to store the address off the site. If the recovery check fails, the command stops and says why; `--force` goes ahead anyway, and that is recorded in the activity log. `--undo` takes you back to wp-login.php. The full reference is [WP-CLI commands](/docs/wp-cli-commands/).

## If you forget the new address

BetterShield emailed a recovery link to the site's administration address when you activated it. Open the newest link, or the address on your printed sheet with one code added, and press **Pause protection and continue**.

That turns on safe mode for one hour. Every fix that runs inside WordPress pauses except the strengthened sign-in keys, and no setting changes, so wp-login.php answers again. Press **Go to sign-in** and sign in as usual.

Once you are in, the card on Login & Access shows the address with **Copy**. Save it off the site, or turn the switch off to go back to wp-login.php. When the hour ends, the moved address applies again.

With no link and no codes, `wp bettershield recover` turns on safe mode from a terminal and needs no user account. More in [Locked out of WordPress?](/blog/locked-out-of-wordpress/)

## Check every link that takes someone to sign-in

Keep your working administrator session open while testing in a separate private window. Record the old setting and the new address before applying the change. Test:

- The new form and a complete sign-in, including the second factor.
- The old wp-login.php route while signed out, allowing for its documented exceptions.
- A visit to wp-admin while signed out, with the dashboard-hiding setting in the state you intend to use.
- Logout and a newly requested password-reset email for a disposable account you control.
- Any custom login widget, membership redirect or WooCommerce flow your visitors use.

WordPress-generated links can be rewritten, but a hard-coded URL in a theme, email template or external help document may still point to the old address. Check those independently. Exclude the new form from the host, CDN and page caches; a successful test while already signed in can miss a cached response served to visitors.

**Worked example (fictional):** a membership site changes its login URL successfully, but the welcome email contains a manually written wp-login.php link. Existing members with bookmarks are fine while new members see a 404. Fix the email template and test a new welcome message before calling the move complete.

If a test fails, undo the URL change from the session you kept open, verify the original path works, and investigate the failed link or cache before retrying.

## Common mistakes

- **Treating it as the main protection.** Keep **Sign-in attempt limits** on and set up two-factor. The address is an extra.
- **Moving the address without hiding the dashboard.** /wp-admin/ then redirects signed-out visitors straight to the new address.
- **Keeping the address in one browser only.** Store it off the site, alongside your recovery link and codes.
- **Running two features that move the sign-in page.** They do not combine predictably. Keep one.

## Frequently asked questions

### Does changing the login URL stop password guessing?

It stops scripts that ask for wp-login.php by name from reaching the form. Anyone with the new address meets the same form, and XML-RPC is a separate way in. Attempt limits slow repeated guesses, and two-factor reduces what a guessed password alone can do.

### Do password reset emails still work?

Yes. Signing in, signing out and password resets all work at the new address, and the sign-in links WordPress builds, including those in its emails, point there.

### Should I also hide wp-admin?

Yes. **Custom sign-in address** moves the form, and **Dashboard privacy for visitors** makes /wp-admin/ answer 404 to signed-out visitors, so it does not redirect them to the new address.

### Is it in the free plugin?

Yes. Both fixes are among the 30 one-click fixes in the free [BetterShield plugin on WordPress.org](https://wordpress.org/plugins/bettershield/), and both undo with the same switch. No account or sign-up is needed.

## Conclusion

Changing the WordPress login URL is worth doing for what it is: a way to take scripted noise off your sign-in form and out of your logs. It is not a lock. Attempt limits, two-factor and passkeys are the lock.

If you move it, check your way back in, apply **Custom sign-in address**, add **Dashboard privacy for visitors**, and note the address off the site. [Hardening](/docs/hardening/) and [Login & Access](/docs/login-and-access/) have the full reference, and [Support](/support/) is there if you get stuck.
