Custom login URL
By default every WordPress site has its login page at /wp-login.php. Bots know this, so they hammer that address on millions of sites. Shield can move the login page to a path of your choosing, which stops most of that automated traffic before it starts.
It is off by default.

What it does#
When you turn it on:
- Your login page appears at
yoursite.com/your-chosen-path. - A visit to the old
/wp-login.phpaddress is turned away. You choose what the visitor gets instead: a 404 page, a redirect to your home page, or a redirect to another address on your site. - WordPress itself starts using the new address. Links to the login page, “Log in” links in themes, password-reset emails and the redirect you get when you open
/wp-admin/while logged out all point to the new path.
Everything else Shield does on the login page, such as CAPTCHA, lockouts, 2FA and passkeys, still works on the new address.
What it doesn’t do#
It hides the login page. It does not make a weak password strong. Anyone who learns the new path can still try to log in there, so keep lockouts, CAPTCHA and 2FA on. Treat the custom path as a way to reduce noise, not as the lock.
Set it up#
- Go to Settings → Login Shield and open the General tab.
- Find the Custom login URL section.
- Turn on Rename /wp-login.php to a custom path.
- In Login slug, type the path you want. Use only lowercase letters, numbers and hyphens, for example
team-entrance. Your site’s address is shown in front of the box. - Under Redirect old URL to, choose what visitors to
/wp-login.phpshould see:- 404 Not Found: looks like the page doesn’t exist.
- Home page: sends them to your home page.
- Custom URL: sends them to an address on your own site that you enter.
- Click Save general settings.
- Before you close the tab: open
yoursite.com/your-slugin a private window and check that the login form appears.
Save the new address first
Write the new address down and store it somewhere safe, like a password manager, before you save. The tab warns: if you forget the slug, getting back in needs FTP or WP-CLI access to reset it. Bookmark the new login page too.
Choosing a slug#
- Make it something that isn’t
login,admin,dashboardorwp-login. Bots try those. - Use a word or phrase that isn’t guessable from your site’s name.
- Pick a path that isn’t already a page, post or category on your site, or the login page will take its place.
- Only lowercase letters, numbers and hyphens are kept. Anything else is removed or converted when you save.
Which “old URL” response should I choose?#
- 404 Not Found: best for hiding the fact that your site has a login page at that address. Bots move on.
- Home page: friendlier. A real person who typed the old address ends up somewhere useful.
- Custom URL: useful if you want to send people to a help page, such as one explaining the new address. It must be a full web address on this site; an address on another domain is not followed.
If you get locked out#
If you forget the slug or the page doesn’t load:
- Use FTP, your host’s file manager or WP-CLI to turn the feature off. See “I locked myself out” in the Troubleshooting section for the exact steps.
- Or use the
NAHNLS_BYPASS_IPconstant if your problem is a lockout, not a lost slug. The bypass doesn’t change the login address.
Things to know#
- Master switch. The custom URL only works while Enable Login Shield is on (General tab). Turning Shield off turns the custom URL off.
- Empty slug. If the slug box is empty, the feature does nothing, even if the switch is on.
- Caching. If you use page caching, make sure your new login path is excluded from the cache. See “Caching and login pages” in the Troubleshooting section.
- Other plugins and themes. Anything that hard-codes
/wp-login.php(a custom menu link, another plugin’s settings) needs updating. Anything that uses WordPress’s normal login URL will pick up the new one. - Bookmarks and old links. Existing bookmarks to
/wp-login.php, including ones your team uses, stop working. Tell your team the new address. - WooCommerce. The My Account login form is a page on your site, so it isn’t affected. See “WooCommerce My Account”.
- Multisite. See “Multisite” in the Troubleshooting section.
- Security checklist. If the custom URL is on, the Checklist tab shows a green pass for it. When it’s off, the Checklist shows an info note suggesting you turn it on.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!