When you create a WordPress website, the default ‘admin’ username makes your website vulnerable to hacking attacks. As WordPress is one of the most popular blogging platforms around the world, it is also one of the most targeted platforms for the hackers therefore, it is important to do all that you can for ensuring the security of your WordPress website. Changing the default ‘admin’ username in WordPress also reduces the possibilities of brute-force attacks.
Below mentioned are 3 ways to change the WordPress admin username:
#1 Manually Change The Admin Username
- Add new user : Login to your WordPress Dashboard. On the left-hand side menu, hover on the option ‘Users’ and click on ‘Add New’
- Save new user : Fill in all the user information. Add a username other than admin. In the ‘Role’ option there will be a drop-down menu, from there choose ‘Administrator’ so that the new user gets the admin rights. Now click on ‘Add New User’.
- Logout from the admin account.
- Login to the new user account that you created.
- Delete the default admin user that was created when you set up your website. View ‘All Users’ in the ‘Users’ section, hover on the default ‘admin’ account and click on ‘Delete’.
- Confirm the deletion : In order to save all the contents that have been previously created with the old admin account, you have to tick on the option – ‘Attribute all content to’ and from the drop-down menu select the new admin username that you created. Finally, click on ‘Confirm Deletion’
After following the steps mentioned above, you will no longer see the old admin account in your users list. Now the new admin account is the one that you have created.
#2 Use Plugins To Change The Admin Username
You can also make use of some WordPress plugins for changing the WordPress admin username. You can use the plugins like – Username Changer, Admin Username Changer, Admin Renamer extended etc. With the use of a plugin all you have to do is enter the new username for replacing the old one.
#3 Change The WordPress Admin Username Through phpMyAdmin
- Login to cPanel and click on ‘phpMyAdmin’ in the ‘Databases’ section.
- Locate the WordPress database from the list present on the left hand side. In case you are not sure which database file it is, you can check the ‘wp-config.php’ file that is present in the root folder of WordPress and look for the line mentioned below:
- When you select your WordPress database, a list of its tables will be displayed. Select the ‘_users’ table from the left hand side menu.
- A list of registered users on your website will be displayed. Search for the admin username and click on ‘Edit’.
- The fields of the admin username will be displayed. Look for the ‘user_login’ field, replace the value of this field to new WordPress login name and click on ‘Go’ option present at the bottom.
The process of changing the admin username is complete and now you can successfully login with your new username.