All users who have tried to modify background users know that in the background editing user options, you can modify nickname, password, contact information, and other information in the background, but the user name cannot be changed, as shown in the figure above.
Does this end the idea of modifying the user name? NO! The following describes two ways to directly modify a database:
1. Directly edit the table through PhpMyAdmin:
1. Log on to the control panel of the host and go to the PhpMyAdmin management interface.
2. Open the corresponding WordPress database, find the wp_users header, click browse, and select edit.
3. Find the user_login and user_nicename fields, and change the original username to the username you want to change. After the command is executed, it will be OK!
2. Execute the SQL Command modification on the PhpMyAdmin interface:
Similarly, go to the host control panel, open the PhpMyAdmin management interface, go to the WordPress database, click SQL next to the structure, and execute the following command:
The code is as follows: |
Copy code |
UPDATE wp_users SET user_login = 'new username' WHERE user_login = 'original username '; |
Tip: The data is priceless. Back up the database before modification! Replace "original user name" in the preceding SQL command with the actual original user name, and "new user name" with the target user name you want to change.