When you first install WordPress the default administrator username is always set to ‘admin’. Most people will just leave it as is and install WordPress.

One little downside of keeping the username ‘admin’ for the site’s administrator is that everyone knows it. If someone with bad intentions wants to login and take over your site, all he or she needs to guess is your password since the username is already known.

Now, the right thing to do here is change the username to something other then admin so bad guys must guess both the username and password if they want break in to your site. This brief tutorial is going to show you how to change it if your site’s administrator username is admin.


  • Change the site’s administrator username in WordPress
  • Enjoy!

To get started, there are two ways to do it. One is connecting to your webhost remotely and logging to the database server and running the commands below.


To logon into your database server, run the commands below.

mysql -u root –p


After logging, run the commands below to change the site’s administrator username.

UPDATE database_name.wp_users SET user_login = 'bloguser' WHERE user_login = 'admin';



Replace database_name with the name of your database.


Or, using your webhost panel, open phpMyAdmin and select the database you wish to edit.




Then click ‘wp_users’ table in the database to continue.




Next, click Edit to edit the selected table.




Finally, change the username for ‘user_login’ field and click the ‘Go’ button at the bottom of the page to save.




That’s it!