If you do not want to use the default login username for WordPress, there are two options for creating a new username either through your WordPress Dashboard or through phpMyAdmin in cPanel.
Option 1: Create a New WordPress User via WordPress Dashboard
This option will create an additional WordPress user since you cannot edit a username from within the WordPress Dashboard. If you do not wish to create an additional user, follow the instructions below to edit your username through phpMyAdmin.
- Log into WordPress Dashboard by going to:
https://example.com/wp-admin
orhttps://example.com/wp-login.php
- Replace example.com with your actual domain name.
- From the left navigation menu, click Users > Add New.
- Create a new Username.
- Enter your email address.
- Complete the fields for first name, last name and website.
- Create a new password and enter it in the next two fields.
- Check the box to Send Password to new user via email.
- Select role of new user.
- Click Add New User.
Option 2: Edit WordPress Username via phpMyAdmin
To edit your WordPress login username in phpMyAdmin, find out which database is associated with the installation of WordPress that you wish to change; then follow the instructions below.
- Log in to cPanel.
- In the Files section, click File Manager.
- From the Directory Selection popup screen, select Web Root (public_html).
- Check the box for Show Hidden Files (dotfiles).
- Click Go.
In the File Manager:
- Navigate to the wp-config.php file.
- Highlight file, right click and select Code Edit.
- Click Edit when the screen pops up.
- Make note of the database name. It will look similar to this:
define('DB_NAME', 'domain_wrdp1')
(Domain will be a prefix form of the actual domain name or cPanel username being used.)
Go back to cPanel:
- In the Databases section, click phpMyAdmin.
- From the left-hand navigation menu, click on the appropriate database name.
- From the left-hand navigation menu, click wp_users.
- In the table, next to the database login information, click Edit.
- In the user_login column, click on your current username and change the name to something you prefer.
- Click Go.
You should now be able to log into your WordPress site with your new username.