At some point, you might want to change your WordPress username, especially for security reasons. 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 to crack. 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!
Related article: How to change your username with a plugin
Changing your username through WordPress
Just to be safe, make a backup before beginning this process!
This is the easy method.
- Go to Users -> Add New;
- Enter a strong username, a new email, a strong password (use 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 afterwards, don’t worry;
- Click on Add New User and you’re done with this step.
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.
After pressing Delete, make sure you attribute all the content to the new account! Click Confirm Deletion and you’re done!
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, since 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 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). In order to find it, you need to go into your hosting’s control panel and access the File Manager, or use a software like SmartFTP or FileZilla.
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 */
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.
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.
4. Locate the user_login field and replace its value with your new WordPress username and then click Go.
That’s it! You’re good to go now!
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!