How to Change your WordPress Username, Nickname and Display Name in MySQL

Share this Article :

Change your WordPress UsernameAfter you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from the WordPress administration console.

Change your WordPress Username

Instead, there is an easier way but rather advance for non-technical people. You can actually use phpMyAdmin to change the username manually in WordPress MySQL database or using the command line or SQL statement as below for your reference.

Change your WordPress Username, Nickname and Display Name in MySQL Table

To do this, follow these steps:

Also Read :   How to Securing MySQL Database Server on CentOS 5.8

1. Login to your Linux VPS using root or for (share hosting), login to ssh console with your cpanel username.

2. In below example, the wordporess database is wordpressdb and table is wp_users.

# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 62547
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use wordpressdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

3. Print existing “user_login, user_nicename, display_name” in wp_users table.

MariaDB [wordpressdb]> select user_login, user_nicename, display_name from wp_users;
+------------+---------------+--------------+
| user_login | user_nicename | display_name |
+------------+---------------+--------------+
| admin      | admin         | admin        |
+------------+---------------+--------------+
1 row in set (0.00 sec)

4. Update “user_login, user_nicename, display_name” in wp_users table to new prefered username, nickname and display name.

MariaDB [wordpressdb]> update wp_users SET user_login = 'problogger';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [wordpressdb]> update wp_users SET user_nicename = 'problogger';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [wordpressdb]> update wp_users SET display_name = 'problogger';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

5. Print updated “user_login, user_nicename, display_name” in wp_users table.

MariaDB [wordpressdb]> select user_login, user_nicename, display_name from wp_users;
+------------+---------------+--------------+
| user_login | user_nicename | display_name |
+------------+---------------+--------------+
| problogger | problogger    | problogger   |
+------------+---------------+--------------+
1 row in set (0.00 sec)

I hope this article gives you some ideas and essential guidance on how to change your WordPress username, nickname and display name in MySQL table.


Leave a Reply