Change WordPress admin username from dashboard

Here is how you can change your WordPress username without accessing the cPanel and editing the database or using any plugins. You will be able to change the username and nickname simply from your dashboard.

All you have to do is add the following code to the theme functions. You will need to replace the old username with the new username and nickname in the code. However, please note that if you are logged in and changing the username of the same logged-in user, you will be logged out. You should then use the new username to access the dashboard.

After making the changes, you can simply delete the code from the theme functions or change the username details for other users. Do give it a try. Thank you very much.

Recent blogs