Guide WordPress

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.

Updated 6 min read Intermediate

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.

  1. Go to Users, then Add New

    In the WordPress dashboard.

  2. 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.

  3. Set the role to Administrator

    The new account needs the same level of access as the one it is replacing.

  4. 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.

  5. 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.

  6. Delete the old account

    Once you have confirmed the new one works fully and any content has been reassigned.

Do this before you need it, not during an incident

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.

Back up first

You are editing a live database table by hand. Export the database, or at minimum the wp_users table, before making this change.

  1. Open phpMyAdmin

    Found in the databases section of your control panel — see using phpMyAdmin.

  2. Open the wp_users table

    Find the row for the account you want to rename.

  3. Edit the user_login column

    Change it to the new username and save.

  4. Log in with the new username

    The password is unchanged — only the login name has changed.

Nickname and display name are different fields

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

SituationUse
You are comfortable with a clean new account and reassigning contentMethod 1
You want to keep the exact same account and its history intactMethod 2
You are not confident editing a database table by handMethod 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