Home > Help Center > Applications > WordPress > Change WordPress Administrator Username

Change WordPress Administrator Username

When installing a WordPressfor the first time, it is very likely that you leave the default settings and complete the installation with the admin username and the table prefix wp_.

In time, however, you find information that default settings make it easier for malicious users to attack your WordPress site. The right thing to do in this situation is to change the default settings with much more secure ones.

In this article we'll show you how you can change WordPress administrator username.

Log in WordPress admin panel – in the top right corner you see your username admin:

change wordpress administrator username

Click Users > Your Profile:

change wordpress administrator username There is no mechanism to edit the username:

change wordpress administrator username

The first thing one can think of is to create another user with administrator role and different username and then to delete user admin.

One obvious negative consequence is that the new user must be associated with different email address. Depending on admin's activities the negatives from changing admin email could easily reach out to a dozen - subscriptions, social media sites, advertising and so on.

It seems following this kind of solution might cause only more troubles.

Luckily there is a solution that will change username only (in spite the label above) without changing anything else.

We are going to follow these steps:

  • Exporting database archive through phpMyAdmin
  • Replacing admin username with the new one in the archive file
  • Importing the archive back

From CPanel open phpMyAdmin in the Database section.

change wordpress administrator username

Click on the database name (if you are not sure check wp-config.php).

change wordpress administrator username

Click Export link, then click Go button:

change wordpress administrator username

Open .sql archive file with some advanced text editor (Notepad++):

change wordpress administrator username

Enter CTRL+H to open Replace window.

Enter admin (old username) in the Find what field.

Enter newboss (new username) in the Replace with field.

Check boxes in front of Match whole word only and Match case labels.

Click Replace All button.

Click Close button to close Replace window.

Save the file with CTRL+S from the keyboard or click File > Save.

change wordpress administrator username

Before importing archive back we must delete all database tables following these steps:

  • click Check All to select all database tables
  • from the dropdown menu select Drop option
  • click Yes button to confirm the deletion

Click Import link, choose the archive file and click Go button:

change wordpress administrator username

Log in WP admin with the new username and the same old password:

change wordpress administrator username

The new username is displayed correctly:

change wordpress administrator username

Your profile is also updated successfully with the new username:

change wordpress administrator username

#wordpress #users

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support