Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Change wp-admin URL in WordPress (Step by Step)

How to Change wp-admin URL in WordPress (Step by Step)

Short answer

You cannot safely rename the wp-admin folder, but you can change the login address. Install a plugin such as WPS Hide Login, set a new login slug under Settings > General and save. Logged-out visitors then cannot reach wp-admin or wp-login.php, and you log in at your new address instead.

Key takeaways

  • Changing the wp-admin URL really means changing the login address.
  • Never rename core folders or edit wp-login.php by hand.
  • WPS Hide Login sets a new login slug under Settings > General.
  • Rename the plugin folder over SFTP if you get locked out.
  • Strong passwords and two-factor login matter more than a hidden URL.

Can you change the wp-admin URL in WordPress?

You cannot safely rename the wp-admin folder itself, but you can change the login URL so that wp-admin and wp-login.php are hidden from visitors who are not logged in.

This is what people usually mean by changing the wp-admin URL. Every WordPress site has a dashboard at /wp-admin/ and a login page at /wp-login.php. Bots know those addresses and hammer them with login attempts.

A login-URL plugin swaps the public login address for one you choose, such as /my-team-login/. Anyone who is not logged in and tries /wp-admin/ or /wp-login.php gets a 404 page or a redirect instead of a login form.

Our explainer on what the WordPress admin URL is covers the default addresses if you need a refresher.

Why shouldn't you rename the wp-admin folder directly?

The wp-admin folder is part of WordPress core, and core files, plugins and themes expect it at that path, so renaming it breaks the dashboard and future updates.

Editing wp-login.php by hand is also a bad idea. The next WordPress update replaces core files and wipes your change, or worse, leaves you with a half-working login.

Plugins avoid this by intercepting requests before WordPress shows the login page. Core files stay untouched, so updates keep working normally.

WordPress's own hardening guide focuses on strong passwords, updates and limiting access rather than moving core folders, which tells you where the bigger wins are.

Should you change the login URL at all?

Changing it cuts down automated login attempts and log noise, but it is a small extra layer, not a replacement for strong passwords, two-factor login and updates.

It helps most on sites that see heavy bot traffic to wp-login.php, which can slow small servers and fill security logs.

It does not stop a determined attacker who finds the address, and it can confuse other users who are used to the old URL. Our guide on whether you should change the WordPress login URL weighs the pros and cons in more depth.

If you decide to go ahead, the steps below show how.

What do you need before you start?

Have a recent backup, admin access, and file access through your host's file manager or SFTP in case you need to undo the change.

Checklist:

  1. Take a backup of files and database.
  2. Confirm you can reach your files through cPanel, a host file manager or SFTP.
  3. Check for existing security plugins. Many already include a login URL option, and running two tools that do the same job causes conflicts.
  4. Tell other users that the login address will change.

The file access step is your safety net. If anything goes wrong, you can switch off the plugin by renaming its folder.

How do you change the login URL with WPS Hide Login?

Install WPS Hide Login, go to Settings > General, scroll to its section, enter a new login slug and save your changes.

WPS Hide Login is a free, lightweight plugin that only does this one job. Steps:

  1. Go to Plugins > Add New Plugin and search for WPS Hide Login.
  2. Click Install Now, then Activate.
  3. Go to Settings > General and scroll to the bottom.
  4. In the Login url field, type your new slug, for example team-access.
  5. Optionally set where blocked requests go. By default they see a 404 page.
  6. Click Save Changes.
  7. Bookmark the new URL straight away.

Your login page is now yoursite.com/team-access/. Logged-out visitors who try /wp-admin/ or /wp-login.php no longer see the login form.

Logged-in users can still reach /wp-admin/ as normal, so nothing changes for day-to-day editing once you are signed in.

Can you use a security plugin instead?

Yes, several security plugins include a rename-login or hide-backend feature, which makes sense if you already use one of them.

Examples include All-In-One Security, which lists a login page rename feature on its WordPress.org page, and Solid Security, which offers a hide-backend option. Feature names and which plan includes them can change, so check each plugin's own page.

MethodEffortExtra featuresBest for
WPS Hide LoginVery lowNone, login URL onlySites that want one simple change
Security plugin featureLowFirewall, login limits, 2FASites already using that plugin
Server rules (htaccess or Nginx)Medium to highIP allowlistsDevelopers and fixed-IP teams
Hosting panel toolsLowVaries by hostManaged WordPress users

Choosing between them is mostly about what you already run. If you have no security plugin, WPS Hide Login is the lightest option. If you already rely on a security suite, use its built-in setting so you have one place to manage login protection.

Only enable this option in one plugin. Two plugins both rewriting the login page can trap you in a redirect loop.

Is there a code-based way to protect wp-admin?

Rather than renaming it in code, developers often restrict wp-login.php and wp-admin to certain IP addresses or add password protection at the server level.

This approach suits teams with fixed office IPs. On Apache you can use rules in an htaccess file, and on Nginx you add allow and deny rules to the server block. The Apache access control documentation explains the syntax.

Be careful: admin-ajax.php sits inside wp-admin and is used by the front end of many sites. Blocking the whole folder can break forms, carts and other features. Restrict wp-login.php first, and test thoroughly.

If you are not comfortable editing server configuration, stick with a plugin.

Some managed WordPress hosts also offer their own login protection, such as extra password prompts or bot challenges in front of wp-login.php. Check your hosting dashboard before adding another plugin, because the host's tool may already cover what you need.

What should you do after changing the login URL?

Test the new login in a private browser window, check that old URLs are blocked, and update any bookmarks, password managers and team docs.

Quick tests:

  1. Open a private window and visit the new login URL. It should show the login form.
  2. Visit /wp-admin/ while logged out. It should not show the login form.
  3. Log in and confirm the dashboard works.
  4. Test anything that relies on login, such as WooCommerce My Account or membership pages.

Some plugins and themes link directly to wp-login.php for password resets or front-end logins. Check that these still work after the change.

Also check any caching or firewall layer in front of your site. A CDN or cache plugin may have stored the old login page, so clear those caches if the new slug does not load or the old URL still shows a form.

Finally, update your password manager entry with the new address. Many password managers match logins by URL, so autofill may stop working until you do.

What if you forget the new login URL or get locked out?

Disable the plugin by renaming its folder in wp-content/plugins through your file manager or SFTP, then log in at the normal wp-login.php address.

Steps to recover:

  1. Open your host's file manager or connect with SFTP.
  2. Go to wp-content/plugins.
  3. Rename the folder, for example from wps-hide-login to wps-hide-login-off.
  4. Log in at yoursite.com/wp-login.php.
  5. Rename the folder back, reactivate the plugin and check the slug in settings.

You can also look up the custom slug in the database options table if you know your way around phpMyAdmin.

For other lock-out causes, our guide on being locked out of wp-admin covers more fixes.

If the login page keeps reloading instead, see login page refreshing and redirecting.

What else should you do to secure your WordPress login?

Pair a custom login URL with strong unique passwords, two-factor authentication, login attempt limits and regular updates, because those stop real attacks.

Priorities, roughly in order:

  • Strong, unique passwords for every admin account.
  • Two-factor authentication for administrators and editors.
  • Limit login attempts or use a firewall that blocks brute-force traffic.
  • Remove unused admin accounts and give users the lowest role they need.
  • Keep WordPress, plugins and themes updated.

The OWASP guidance on credential stuffing explains why reused passwords are such a big risk, even with a hidden login page.

For broader bot traffic, see how to block bad bots in WordPress. A custom login URL then becomes one sensible layer among several, not the only lock on the door.

Frequently asked questions

Does changing the login URL stop hackers?

It reduces automated bot attempts on the default login page, but it does not stop a targeted attack. Strong passwords, two-factor authentication, login limits and updates provide much stronger protection than a hidden address.

Will changing the wp-admin URL break my site?

Usually not when done with a well-maintained plugin. Problems appear when two plugins change the login page at once, or when a theme or plugin hard-codes wp-login.php. Test logins, password resets and account pages afterwards.

Can I still use /wp-admin after changing the login URL?

Yes, once you are logged in. The dashboard still lives at /wp-admin/. The plugin only hides it from visitors who are not logged in, sending them to a 404 page or another address instead.

What happens if I deactivate the login URL plugin?

WordPress goes back to the default login addresses, so wp-login.php and wp-admin work as normal for everyone. This is also the quickest way to regain access if you forget your custom login slug.

Does WordPress have a built-in setting to change the login URL?

No. WordPress core has no option for a custom login address. You need a plugin, a security plugin feature, a host tool or server-level rules to change or protect the login page.

Sources

  1. WPS Hide Login WordPress.org Plugins
  2. Hardening WordPress WordPress Developer Resources
  3. All-In-One Security (AIOS) WordPress.org Plugins
  4. Access Control Apache HTTP Server Documentation
  5. Credential stuffing OWASP

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.