2 easy ways to change the username in WordPress site?

Sometimes one click installs provided by the hosting service creates random username. What if you want to change the username in WordPress site? By default the username can’t be changed however, there are few tricks.

Change the username using a plugin

The safest way to change the username is by installing a “Username changer” plugin. Once the plugin is installed and activated, you need to go to your profile page and scroll down to username field. There you will see a link “Change Username”.

Like I said earlier by default, username field is non-editable. But with the help of this plugin if you click on that link, the username field becomes editable:

change-the-username-in-WordPress

Input the intended username and click on “Save Username” button. You will be asked to login again as the cookies set with the previous username does not hold true anymore. So you just need to re-login with the new username.

Change the username by editing database

I am using “Local by Flywheel” which makes setting up local WordPress sites very easy. It also provides admin tools like database editor (Adminer) and email catcher (Mailhog). In case of web hosts such as Bluehost, Dreamhost etc, they do offer PhpMyAdmin using which you can edit your database. Below I am explaining how you can edit the username with Adminer:

  1. Once you open the database in Adminer, locate the wp_users table
  2. Click on the table name which will show you the structure of the table
  3. Now you need to click on “Select Data” so that you can see the table contents
  4. Then locate the user you want to edit and click on the checkbox OR ‘edit’ link under ‘Modify’ column
  5. You will see a form to edit the values for that row. Now change the value of ‘user_login’ field to the new username that you want
  6. Click on the ‘Save’ button and then go back to your website dashboard.
  7. In this case also you will be asked to re-login as the old cookies does not hold true anymore because of the change in username.
  8. Re-login again with the new username to access the dashboard.

One important thing to note is that you can change username only in self hosted WordPress site and it is not possible to change it on WordPress.com website.

Leave a Reply