At some point, you might want to change your WordPress username, especially if you want to enhance your WordPress security.

Cloudways

Choosing a strong username will make things a lot more difficult for hackers.

We’ve noticed that a lot of webmasters still use “admin” as a username, which is very wrong. That’s the first thing hackers will try out.

Cloudways

If they nail the username, the only thing standing in their way is the password, and if that’s an easy one too, then it won’t be much trouble for them to break into your website.

So, in this article, we’ll show you two different methods to change your WordPress username!

Changing your username through WordPress

Just to be safe, make a backup before beginning this process!

Cloudways

This is the easy method.

  • Go to Users -> Add New;
  • Enter a strong username, a new email, a strong password (use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & )), and make sure you select the Administrator Role. You can’t enter the same email that you used on your old account, but you can change it afterward, don’t worry;
  • Click on Add New User and you’re done with this step.

how to add new user in wordpress

Now, after you’ve added the new user, you need to log out and then log back in with your new account. After you’ve logged back in, go to Users -> All Users and delete the old account.

how to delete users in wordpress

Cloudways

After pressing Delete, make sure you attribute all the content to the new account! Click Confirm Deletion and you’re done!

delete users in wordpress

Congrats! You’ve successfully changed your WordPress username!

You can now go to Users -> Your Profile and add the old email you had.

Changing your username through phpMyAdmin

This is a bit more complex because you need to make some changes to your database. So, if you don’t think you can manage it, ask someone with more WordPress experience to do it for you!

This method should be used in case you forget both your username and email, and you won’t be able to log in to your Dashboard to apply the first method.

Important: Make sure you perform a database backup before making these changes, just to be safe!

Finding the name of your database

If you’re not sure what’s the name of your database, you need to check your wp-config.php file, which is found in the root folder of your WordPress installation (usually public_html).

For that, you’ll need to know how to access your WordPress files.

Once you’ve found the wp-config.php file, right-click on it and press View, Preview, Open, etc (depends on the control panel or FTP software you’re using). Now look for something like this:

/** MySQL database username */
define('DB_USER', 'your_db_name_will_be_here');

This line of code is usually at the very beginning of the file, so you won’t have a hard time finding it.

Now that you found out the name of your database, we can proceed to the next step.

Changing the username in phpMyAdmin

I’ll use cPanel for this step.

1. Go to cPanel and click on phpMyAdmin under Databases.
phpmyadmin in cpanel

2. After you’ve selected your database from the list on the left, find the _users table and click on it.

3. Find the admin username on the list and click Edit.

change your wordpress username using phpmyadmin

4. Locate the user_login field and replace its value with your new WordPress username and then click Go.

change wordpress username in phpmyadmin

That’s it! You’re good to go now!

Conclusion

If you still haven’t changed the default admin username, or you have a username that can easily be cracked through brute force (like it happened to us in our WordPress beginnings), then now is the time to do it! Just make sure you perform a backup before. Better safe than sorry!

Hope you’ve enjoyed our post and found it helpful! If you have any questions or want to share your thoughts with us, please leave a comment!