How to change the WordPress admin username
WordPress will not let you rename a username directly — create a new administrator account instead, or rename it through the database.
WordPress deliberately does not offer a way to rename an existing username from the dashboard — the username field on a user's profile page is fixed once the account is created. This surprises people who expect it to work like a display name, and it means changing away from a weak username like admin needs one of the two methods below rather than a simple settings edit.
Why the username matters for security
A WordPress login needs two things: a username and a password. If the username is admin — still the default on many older installs and one-click installs that were never changed — an attacker has already guessed half of what they need, and every automated login attempt tries it first. Changing it to something unpredictable removes that half of the attack for free, before a single password attempt is even made.
Method 1: create a new administrator account
The simplest and safest approach, since it does not touch the database directly and cannot be undone incorrectly.
-
Go to Users, then Add New
In the WordPress dashboard.
-
Create a new account with your preferred username
Use a real email address you control, and choose something that is not guessable — not your name, not the site name, not "admin" with a number appended.
-
Set the role to Administrator
The new account needs the same level of access as the one it is replacing.
-
Log out and log back in as the new user
Confirm you have full administrator access before proceeding — check you can see Plugins, Themes, and Settings as expected.
-
Reassign content from the old account, if it authored anything
Go to Users, hover over the old account, and use the option to change its role — or when deleting it, WordPress will prompt you to attribute its posts to another user.
-
Delete the old account
Once you have confirmed the new one works fully and any content has been reassigned.
If you are only doing this now because you suspect something is wrong, also change every other password on the site and review the full list of users for anything else unfamiliar — see securing a WordPress site.
Method 2: rename the username directly in the database
Use this if you specifically want to keep the same account — its ID, its post authorship, its settings — and only change what it is called at login.
You are editing a live database table by hand. Export the database, or at minimum the wp_users table, before making this change.
-
Open phpMyAdmin
Found in the databases section of your control panel — see using phpMyAdmin.
-
Open the wp_users table
Find the row for the account you want to rename.
-
Edit the user_login column
Change it to the new username and save.
-
Log in with the new username
The password is unchanged — only the login name has changed.
WordPress separately lets you set a public display name from the user's profile page in the dashboard, which is what visitors see on posts — that has always been editable and is not the same as the login username this guide covers.
Which method to choose
| Situation | Use |
|---|---|
| You are comfortable with a clean new account and reassigning content | Method 1 |
| You want to keep the exact same account and its history intact | Method 2 |
| You are not confident editing a database table by hand | Method 1 — it involves no direct database editing |
After changing the username
- Update any saved logins in your browser or password manager to match.
- If a security or login-limiting plugin is in use, confirm it recognises the new username rather than still watching for the old one.
- Consider pairing this change with limiting WordPress login attempts, since a strong username is one layer and a login attempt limit is another — they work best together rather than as alternatives to each other.
If something goes wrong
If you renamed the username directly in the database and can no longer log in, double check the exact value now sitting in user_login for that row — a stray space or a character typed incorrectly during the edit is the most common cause. Log in using precisely what is stored there rather than what you intended to type. If you cannot get back in at all, resetting a WordPress password covers the same phpMyAdmin approach for the password field, and the same care around exact values applies.
If you chose Method 1 and deleted the old account before confirming the new one fully worked, restore from the backup you took before making the change, then repeat the process more carefully — testing the new account thoroughly before removing the original.
A username is not a secret, but it should not be a guess
Unlike a password, a username is often visible in places you do not control — as the author name on a post, in a page's source code, or through a simple enumeration request most WordPress sites respond to by default. Treat changing it as removing an easy first guess rather than hiding information completely, and rely on a strong password and two-factor authentication as the layers that actually have to hold under a determined attempt.
Related reading
WordPress does not limit failed logins by default. Here is how to add a lockout, and what to pair it with for it to actually help.
How to reset a WordPress passwordThree ways to reset a WordPress password, from the ordinary email link to editing the database directly when nothing else works.
How to use phpMyAdminOpening phpMyAdmin from your control panel and using it to browse, edit, import and export a database.
How to secure a WordPress siteUpdates, strong unique logins, two-factor authentication, a minimal plugin list, and backups that actually restore — in that order of importance.