If you're here, you probably tried to edit your username in the WordPress admin and found the field greyed out ("Usernames cannot be changed").
There are two ways around it: a plugin, or the database.
With a plugin (easiest)
- Install and activate Username Changer.
- Open the user's profile (Users → Profile). The greyed-out field now has a Change Username option.
- Save. The user will have to log in again.
You can safely uninstall the plugin afterwards.
In the database (phpMyAdmin)
Only do this if you've worked in a database before. Back it up first, and change only the one field below.
phpMyAdmin comes with most hosts (cPanel, for example). If you don't know how to log in, ask your host. On my own servers, I use Sequel Ace over an SSH tunnel.
- Click your site's database in the left menu.
- Open the
wp_userstable. Thewp_prefix can differ between installs, and that's normal. - Find the user and double-click the value in the
user_logincolumn, or click Edit on the row. - Change it and save (Go).
Or run it as SQL:
UPDATE wp_users SET user_login = 'new-username' WHERE user_login = 'old-username';Still have a user named admin? Rename it. It's the first username bots try.