Want to change your WordPress username? You may have just tried to change your username from the WordPress admin panel, to find out that this is not really possible:
Don’t want to read the article? Check out the video below.
How to change your WordPress username
The good news is that there are other ways to change one’s username in WordPress. In this article I’ll be covering three ways to change a username. The first method is using a plugin, which is probably the easiest and fastest method for non-technical WordPress users. The second one is creating a new user and deleting the old one.
Lastly, I’ll explain how to change your username directly in your WordPress site’s database. If you’re not comfortable editing your database, this last method is obviously not meant for you. I also recommend to always make a backup of your WordPress site before making any changes. Most web hosting services offer automatic (daily) backups.
Method 1: Using a plugin
As with almost anything you may want to change in WordPress, there’s a plugin for that. In fact, there are many plugins that can help you change your username. A search in the plugin repository shows that there are many different plugins available to help change your username.
One plugin that is very easy to use is Username Changer. Install it on your WordPress site via Plugins > Add New. After activating the plugin, you’ll find a new menu under Users > Username Changer.
The plugin also brings a new Settings panel to add certain requirements for usernames on your WordPress site. You may for instance want to force users to have a username with a length of at least 5 characters. It also allows to define which user roles are permitted to edit their usernames without an administrator.
Did you install the plugin just to change a single username? It is perfectly OK to deactivate and delete the plugin from your WordPress site when you’re finished editing usernames.
Method 2: Adding a new user and deleting the old one
Don’t want to install a plugin? Another way to change your username is to replace the user with a new user. Please read the instructions carefully: if you don’t follow the steps below correctly, you may accidentally delete some of your site’s content.
To do that, log in to WordPress and navigate to Users > Add New. Create a new user with the “Administrator” role. Now log out of WordPress and log in with the new username. Go to Users > All Users and delete the ‘old’ user. Before doing so, please read below instructions carefully.
It could be that the old user created most of the pages and posts on your WordPress site. Therefore, take care when deleting the user. WordPress will suggest to attribute all the user’s content to another user. Before clicking “Confirm Deletion“, make sure the second option is selected (“Attribute all content to:“) and select the newly created user.
Method 3: Changing the username in the WordPress database
The last method that I will cover is to change your username directly in the (MySQL) database of your WordPress site. If you don’t feel comfortable navigating your hosting’s control panel, I suggest to use one of the other methods described above.
To edit your username in the database, you’ll need to open your web hosting’s control panel. This panel can be called cPanel, DirectAdmin or something else. In this control panel, look for an option phpMyAdmin. My hosting uses DirectAdmin as a control panel, and phpMyAdmin is found under Advanced Features:
Depending on your hosting service, you may be asked to enter a username and password to access phpMyAdmin. This will be the username and password of your database. To retrieve those, you’ll need to find your wp-config.php file and look for the database name, username and password:
/** The name of the database for WordPress */ define( 'DB_NAME', 'database_name_here' ); /** MySQL database username */ define( 'DB_USER', 'username_here' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password_here' );
After reaching the phpMyAdmin screen, look for your site’s database name on the left side of the screen:
Open the database by clicking the + icon on the left, then scroll down to find “wp_users” table. This is the database table that contains all your WordPress site’s users.
In the table on the right side of your screen, look for the username that you want to change and click Edit:
Now edit the username in the user_login field and click “Go” in the bottom of the screen.
That’s it! You have now changed your username from the WordPress database.
Did you find this article helpful? Please consider following me on Twitter or leave a comment down below.