All posts

Blog

How to Change the WordPress Login URL (and Whether You Should)

Illustrated cover for the WordPress guide "How to Change the WordPress Login URL (and Whether You Should)"

Every WordPress site in the world has its login page at the same address: /wp-login.php, with /wp-admin/ redirecting there for anyone who is not signed in. That consistency is handy when you forget where to log in. It is also handy for bots, which hammer those addresses on millions of sites every day, trying common usernames and leaked passwords.

Changing the WordPress login URL is a popular way to cut down on that noise. This guide explains what it actually achieves, how to do it safely, and how to get back in if something goes wrong.

What changing the login URL does

When you move the login page to a custom address, such as /team-entry/, requests to /wp-login.php and /wp-admin/ from visitors who are not logged in no longer show a login form. Depending on the tool, they get a 404 page or are redirected to your homepage.

That has a few practical benefits:

  • Fewer automated login attempts. Most bots only try the default addresses. If the form is not there, they move on.
  • Cleaner logs and fewer alerts. Security plugins stop flooding you with notifications about failed logins.
  • Less server load. Each login attempt runs PHP and queries the database. On a site under constant attack, blocking those requests early saves resources.

What it does not do

It is important to be honest about the limits. A custom login URL is obscurity, not security. It does not fix:

  • Weak or reused passwords
  • A vulnerable plugin that lets attackers bypass login entirely
  • Phishing that tricks you into entering your password elsewhere
  • An attacker who has already found your custom URL

Treat it as one layer on top of the real protections: strong unique passwords, two-factor authentication, limited login attempts and up-to-date plugins. Our WordPress security checklist and guide to stopping brute-force login attacks cover those in detail.

Before you start

  • Back up your site. A full backup of files and database takes minutes and makes any mistake reversible.
  • Make sure you can reach your files. You will want hosting file manager or SFTP access in case you need to undo the change.
  • Pick a URL you will remember, but not something obvious like /login/ or /admin/, which bots also try. Bookmark it as soon as it works.
  • Tell your team. Anyone who logs in needs the new address.

Method 1: Use a dedicated plugin

The simplest and safest approach is a small plugin built for this job. WPS Hide Login is a widely used free option. Several security plugins, such as Solid Security (formerly iThemes Security) and some firewall plugins, include a similar feature.

With WPS Hide Login:

  1. Go to Plugins → Add New, search for "WPS Hide Login", install and activate it.
  2. Go to Settings → General and scroll to the bottom.
  3. Enter your new Login URL, for example team-entry.
  4. Optionally set a Redirection URL, where people trying the old address are sent. The default is a 404 page.
  5. Click Save Changes.
  6. Open a private browser window and test the new login address before you log out of your current session.

The plugin does not rename or move any core files. It intercepts requests, so WordPress updates keep working normally.

Method 2: Protect wp-login.php at the server level

If you would rather not add a plugin, you can leave the URL alone and restrict access to the login file instead. Two common approaches:

Password-protect the login file

Many hosting control panels have a Directory Privacy or Password Protect Directories tool. On Apache or LiteSpeed servers you can also add HTTP authentication to just wp-login.php with an .htaccess rule and a password file. Visitors must enter a separate username and password before the WordPress login form even loads.

Limit login access by IP address

If you always log in from a fixed IP address, such as an office connection, you can allow only that address to reach wp-login.php:

<Files wp-login.php>
    Require ip 203.0.113.10
</Files>

Replace the example address with yours. This is very effective, but it locks you out whenever you log in from somewhere else, so it does not suit people who travel or use mobile data.

Why you should not rename wp-login.php yourself

You may see advice to rename wp-login.php or edit core files. Avoid it. Core files are replaced during WordPress updates, so your change will be undone or will break logins after an update. Plugins and server rules achieve the same goal without touching core.

Things that may need updating

After changing the login URL, check:

  • Bookmarks and password managers. Update the saved URL so autofill works.
  • Login links in menus or widgets. Some themes add a "Log in" link pointing at the default address.
  • WooCommerce and membership sites. Customers usually log in through a My Account page, which keeps working. Test it anyway.
  • Caching plugins. Make sure the new login page is excluded from page caching. Most caching plugins exclude logged-in users and login pages automatically, but confirm it.
  • Two-factor and security plugins. Test that the full login flow, including the second step, works on the new address.

How to get back in if you forget the URL or get locked out

It happens. Here is the fix:

  1. Log in to your hosting control panel and open File Manager, or connect with SFTP.
  2. Go to wp-content/plugins/.
  3. Rename the plugin's folder, for example from wps-hide-login to wps-hide-login-off.
  4. WordPress deactivates the plugin automatically, and /wp-login.php works again.
  5. Log in, rename the folder back, reactivate the plugin and check the setting under Settings → General.

If you used an IP or password rule in .htaccess, edit the file in File Manager and remove or adjust the rule.

Should you change your WordPress login URL?

It is worth doing if:

  • Your security logs show constant login attempts
  • Your site is on shared hosting where wasted requests eat into your resource limits
  • You want fewer security alert emails

It matters less if you already use a firewall that blocks login abuse, or if you restrict login by IP. Either way, it is no replacement for strong passwords and two-factor authentication.

Wrap-up

Changing the WordPress login URL hides the login form from the bots that target /wp-login.php, which means fewer attacks, less noise and less wasted server load. Use a plugin like WPS Hide Login or a server-level restriction rather than editing core files, bookmark the new address, and remember the plugin-folder rename trick in case you ever get locked out. Then make sure the real protections, unique passwords and two-factor authentication, are in place too.