How to Change Username in WordPress
Have you ever tried to change the username of a WordPress website? If you have tried it by going to your profile page in the WordPress dashboard, you will find a message saying “usernames cannot be changed.” Recently, I encountered this when I had a discussion with someone on blog security. I always recommend not to use the default admin username for a blog. It makes it easier to Bruteforce the WordPress password because the username is already known to the attacker. After understanding my point, the other person instantly asked me to change the username of the WordPress user. I suggested him to check the profile section but there was no option to edit username.
As I am a developer, I can do most of the things from code and database. I knew that we can do this from the database. In this article, I am writing the how you can change the username of a WordPress user.
Best Managed WordPress HostingWPEngine is the best and most secure managed hosting provider
In this tutorial, I will tell you different ways to change the username in WordPress. You can either directly update it in the database or use a plugin.
Change Username using PHPMyAdmin
If you do not want to use any plugin, you access the database and directly update the username in the MySQL table. Most web hosts provide cPanel that offers PHPMyadmin to access the MySQL database. So, let me show you how to change the username using PHPMyAdmin.
Login to your cPanel and find the database section. Here click on the PHPMyAdmin option.
Now select the database of your blog from the left sidebar. In your database, select table wp_users. Basically, it is the users table and there should be wp_ prefix if you didn’t change the prefix at the time of installing WordPress. If you couldn’t find the wp_users table, try finding the users table of a table name users with a different prefix.
Now click on edit in front of the row that has user_login value as admin. Here I am assuming that you want to change the username of admin. If you have some other username to change, try finding that row.
Change the user_login value to whatever you want. Change it to anything you want as a username. Do not try to change the value in the password field. WordPress saves the encrypted password. If you change anything here, you wouldn’t be able to log in with your password unless you reset it.
Now go to your website and log in with this new username and existing password.
Also see: How to Speed up WordPress Blog
Change Username by Using a Plugin
If you do not want to touch the MySQL table, you can use a WordPress plugin to change the username. There are several good plugins to change the username in your WordPress blog. First of all, you need to install the Easy Username Updater plugin on your WordPress blog and activate it.
After activation of this plugin, go to the Users » Username Updater page. Here, you will see an update link in front of the users list. Clocking on the update will redirect you to a page where you can update your username.
After you have updated the username, you can remove this plugin from your WordPress blog. There is no need to have too many plugins that you don’t use daily. You are not going to change usernames daily. 😀
Create a new user with admin roles.
While this method is fine, I was suggested an easier way that needs no access to CPanel. You can create a new user account on your WordPress website. Then give administrator privileges to this newly created account. Log in with this new user account and deleted the old one having the username “admin.” While deleting the old account, assign all posts to your new username.
There could be many reasons why you wish to change the username of an account. I have covered two different ways to achieve the same. Any of these ways will be the same. If you still have any confusion or want to ask something, you can always contact me. You can either comment below or connect with me on different social media platforms.