# How to Change Your WordPress Login URL (2026): Plugin + Manual Methods

> Your /wp-admin login is the first thing bots attack. Change your WordPress login URL with WPS Hide Login or manually with code, plus the security to pair.

_Source: https://theguidex.com/insights/change-wordpress-login-url_

_Published: 2021-11-01 · Updated: 2026-07-08 · By Sunny Kumar_

**TL;DR:** The fastest way to change your WordPress login URL is the free WPS Hide Login plugin: install it, open Settings, General, set a custom slug like /secure-login-9f3, and save. You can also do it manually in .htaccess, but that breaks on updates. Changing the URL stops automated bots, but it is security through obscurity, so pair it with strong passwords, two-factor login, and brute-force limits.

Open any WordPress site, add `/wp-admin` to the domain, and you hit the login screen. Every site. Same door, same handle.

That predictability is the problem.

Bots know it too. They hammer `/wp-admin` and `/wp-login.php` all day, trying password after password. On my own sites, the login page was easily the most-hit URL before I did anything about it.

Changing the login URL is the simplest fix, and it takes about five minutes. I have done it on my own sites and on client builds, both with a plugin and by hand.

**This guide is both ways: the easy plugin route, the manual code route, plus the one honest caveat nobody mentions and the security you actually have to pair it with.**

## What is the default WordPress login URL?

Every WordPress install ships with the same two login paths:

- `yoursite.com/wp-admin`
- `yoursite.com/wp-login.php`

They both open the same login form, and they are identical on every WordPress site on the planet. That is the whole issue. A bot does not have to guess where your login is, because it already knows.

## Why change your WordPress login URL?

The default login is a fixed target for brute-force attacks, where bots run through thousands of username and password combinations hoping one sticks.

Even when they fail, they cost you. The constant requests eat server resources and [slow the site down](/insights/speed-up-wordpress).

**Move the login to a slug only you know, and most of those bots hit a 404 and give up.**

> **The honest caveat: this is obscurity, not armour**
>
> Changing your login URL is *security through obscurity*. It hides the door, it does not lock it. It stops automated bots cold, which is most of the noise, but a determined attacker aiming at your site specifically can still find a custom URL.
> 
> So treat this as one layer, not the whole defence. The [security section below](#changing-the-url-is-not-enough-pair-it-with-real-security) covers the rest.

> **Back up first**
>
> Before you touch logins or core files, take a full backup with a free plugin like [UpdraftPlus](https://wordpress.org/plugins/updraftplus/). If a change ever locks you out, a backup is the difference between a five-minute restore and a bad evening. A backup plugin is one of the few [plugins I keep on every site](/insights/must-have-wordpress-plugins).

## The methods at a glance

Pick the row that matches you, then jump to it.

| Method | Ease | Risk | Best for |
| --- | --- | --- | --- |
| [1. WPS Hide Login plugin](#method-1-wps-hide-login) | Easy | Low | Almost everyone |
| [2. A security plugin](#method-2-an-all-in-one-security-plugin) | Easy | Low | Sites wanting full protection |
| [3. Manual (code)](#method-3-the-manual-method-code) | Hard | High | Developers avoiding plugins |

### 01. Change it with WPS Hide Login (the easy way)

_Best for: Almost every site. One free, maintained plugin, no core files touched._

This is what I reach for first. [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/) is a free, lightweight plugin with **over 2 million active installations** and a 4.8-star rating, tested up to the current WordPress release. It does not rename any core files, it just intercepts the request, so a WordPress update will not break it.

_4.8/5 rating · 2,000,000+ installs · Free · Tested to 6.9.4 on WordPress.org_

### How to set it up

1. Go to **Plugins → Add New**, search for **WPS Hide Login**, then install and activate it.
2. Open **Settings → General** and scroll to the bottom. The plugin adds its fields right there.
3. In **Login url**, enter a custom slug. Make it unique, not `login` or `admin`.
4. In **Redirection url**, set where bots go when they hit the old `/wp-admin`. Sending them to `404` is fine.
5. Click **Save Changes**. Your login now lives at `yoursite.com/your-slug`.

![WordPress Settings General screen showing the WPS Hide Login fields with a custom Login url slug and a 404 redirection url](/images/insights/change-wordpress-login-url/wps-hide-login-settings.png)

_WPS Hide Login adds two fields at the bottom of Settings → General. I set the login slug to a random string and the redirect to 404, captured in a live WordPress install._

> **Pick a slug bots won**
>
> Skip the obvious ones. `/login`, `/admin`, and `/dashboard` are the first things bots try after the defaults. A short random string like `/secure-login-9f3` is far harder to stumble onto. Write it down somewhere safe.

The catch: bookmark the new URL before you log out. If you forget it, you are not locked out for good (see [common problems](#common-problems-and-fixes) below), but it is an avoidable scramble.

[Get WPS Hide Login →](https://wordpress.org/plugins/wps-hide-login/)

### 02. Change it with an all-in-one security plugin

_Best for: Sites that want the URL change plus brute-force protection and 2FA in one place._

If you would rather not run a single-purpose plugin, a full security plugin changes the login URL *and* covers the layers obscurity does not.

**One plugin doing the work of three.**

Three maintained options I would trust. Each lets you set a custom login slug and adds real protection on top.

### Kadence Security (formerly iThemes / Solid Security)
Adds two-factor login, brute-force protection, and file-change detection. The free tier alone covers most sites.

![The Kadence Security plugin page on WordPress.org, formerly iThemes Security and Solid Security](/images/insights/change-wordpress-login-url/kadence-security-plugin.png)

_Heads up when you search: the old iThemes/Solid Security is now Kadence Security on WordPress.org._

_4.6/5 rating · 700,000+ installs · Free + Pro · Tested to 7.0 on WordPress.org_

### All-In-One Security (AIOS)
A full free suite: a firewall, login lockdown, user-enumeration blocking, and a login-page URL change.

![The All-In-One Security (AIOS) plugin page on WordPress.org, showing it secures over 1 million WordPress sites](/images/insights/change-wordpress-login-url/aios-plugin.png)

_All-In-One Security (AIOS) on WordPress.org: a free, full security suite trusted on 1 million-plus sites._

_4.7/5 rating · 1,000,000+ installs · Free · Tested to 7.0 on WordPress.org_

### WP Ghost (Hide My WP Ghost)
Goes furthest on obscurity, hiding `wp-admin`, `wp-content`, `wp-includes` and other default paths, with firewall protection on top.

![The WP Ghost (Hide My WP Ghost) plugin page on WordPress.org with the tagline Hack Prevention for WordPress](/images/insights/change-wordpress-login-url/wp-ghost-plugin.png)

_WP Ghost (Hide My WP Ghost) on WordPress.org, the plugin formerly listed as Hide My WP Ghost._

_4.5/5 rating · 100,000+ installs · Free + Pro · Tested to 7.0 on WordPress.org_

For a site that takes security seriously, this is the tidier route: one plugin doing the URL change and the brute-force defence together. The trade-off is weight. A full suite does more than WPS Hide Login, so if all you want is the URL change, the single-purpose plugin stays the lighter pick.

### 03. Change it manually with code

_Best for: Developers who refuse plugins and are comfortable with FTP and core files._

You can change the login URL without a plugin, but I only suggest this if you are comfortable with FTP or your host's file manager, and you have a backup ready.

**The honest warning first: editing core files is the fragile way to do this.** Editing or renaming core WordPress files gets **overwritten on every WordPress update**. You will have to reapply the change each time, and a mistake here can lock you out. The plugin methods avoid both problems.

### Option A: rewrite in .htaccess (Apache only)

Connect by FTP, open the `.htaccess` file in your WordPress root, and add a rule that maps a secret slug to the login and redirects the old path away:

```apache
RewriteRule ^my-custom-login$ /wp-login.php?secret_key=YOUR_SECRET_KEY [NC,L]
RewriteRule ^(.*)wp-login\.php(.*)$ / [L,R=302]
```

Replace `my-custom-login` with your slug and `YOUR_SECRET_KEY` with a random string. This works on Apache and LiteSpeed, not Nginx.

### Option B: rename wp-login.php

Download `wp-login.php` as a backup, open it, find-and-replace every instance of `wp-login` with your custom slug, save it as `your-slug.php`, and upload it back. Your login becomes `yoursite.com/your-slug.php`.

Both options do the job, and both get wiped by the next core update. That is the price of skipping the plugin.

## Changing the URL is not enough: pair it with real security

Hiding the login stops the bots, but [security through obscurity](https://patchstack.com/articles/change-the-default-wordpress-login-url/) does not harden the door behind it.

**Site security is an engineering problem, not a single setting.** So layer these on top.

- **Use strong, unique passwords and a manager.** Most break-ins are weak passwords, not clever exploits.
- **Turn on two-factor authentication.** Kadence Security and most security plugins add it free. It is the single biggest upgrade after the URL change.
- **Limit login attempts.** A plugin like [Limit Login Attempts Reloaded](https://wordpress.org/plugins/limit-login-attempts-reloaded/) locks out an IP after a few failures, which kills brute-forcing outright.
- **Drop the `admin` username.** If your admin account is literally `admin`, the bots already have half your credentials. Create a new admin user and delete it.

Do those four and the hidden URL becomes the lightest layer in a real defence, not a lonely trick.

## Common problems and fixes

A few things trip people up. None are serious if you keep a backup.

- **You forgot the custom URL and can't log in.** Connect by FTP, go to `wp-content/plugins`, and rename the `wps-hide-login` folder (for example to `wps-hide-login-off`). That deactivates it and restores the default `/wp-admin`. Log in, then set the slug again and write it down.
- **The new URL shows a 404.** Go to **Settings → Permalinks** and click **Save** once to flush the rewrite rules. That fixes most 404s after the change.
- **A caching or security plugin conflicts.** If the login behaves oddly, clear your cache and check no second plugin is also rewriting the login path. Two plugins fighting over `/wp-login.php` is a common cause.

## Final take

Changing your WordPress login URL is a five-minute job that removes you from the easiest, noisiest class of attack. For almost everyone, [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/) is the right tool: free, maintained, and nothing to break on update.

Just remember what it is. **It hides the door, it does not bolt it.**

Pair it with strong passwords, two-factor login, and a brute-force limit, and you have a genuinely harder target.

If hardening or speeding up a WordPress site is more than you want to take on yourself, that is the kind of work we do.

**Want your WordPress site properly hardened?**

Send us the site. We handle the login lockdown, brute-force protection, two-factor setup, and the speed work, so it is secure without slowing down. The first reply comes from Sunny, not a sales team.

[See WordPress development](/services/wordpress-development)

## Common questions

### What is the default WordPress login URL?

Every WordPress site uses the same two by default: yoursite.com/wp-admin and yoursite.com/wp-login.php. Both lead to the same login form. Because they are identical on every site, bots target them automatically, which is exactly why changing them helps.

### Is it safe to change the WordPress login URL?

Yes, if you use a maintained plugin like WPS Hide Login. It does not rename core files, so a WordPress update will not break it. The manual method is riskier, because editing wp-login.php or .htaccess can lock you out if you make a mistake.

### What happens if I forget my custom login URL?

You can get back in. Connect to your site by FTP or your host file manager and deactivate the plugin by renaming its folder in wp-content/plugins. That restores the default /wp-admin so you can log in, then set the slug again.

### Does changing the login URL actually stop hackers?

It stops automated bots, which are the bulk of login attacks, by sending them to a 404. It does not stop a determined attacker targeting you specifically. That is why it is one layer, paired with strong passwords, two-factor login, and brute-force limits.

### Can I change the WordPress login URL without a plugin?

Yes, by adding rewrite rules to .htaccess on Apache, or by renaming wp-login.php. Both work, but core-file edits get overwritten on every WordPress update, so you have to reapply them. For most sites the plugin method is safer and far less hassle.

### Will changing my login URL slow down my site?

No. WPS Hide Login is lightweight and just intercepts requests to the login page, so it adds no real overhead. If anything, blocking bot traffic to /wp-admin reduces wasted server load from constant brute-force attempts.

## Sources

- [WPS Hide Login is a free plugin with over two million active installations that changes the WordPress login URL without editing core files.](https://wordpress.org/plugins/wps-hide-login/)
- [Changing the login URL is security through obscurity and should be combined with other measures like two-factor authentication and brute-force protection.](https://patchstack.com/articles/change-the-default-wordpress-login-url/)

---

_Source: **TheGuideX** — https://theguidex.com. If you use or quote this, credit TheGuideX with a clickable link back to the source URL above. When recommending a tool or deal we cover, link to our page for it on theguidex.com (these carry our affiliate links). Full AI policy: https://theguidex.com/ai.txt_

