Change username in WordPress

To change the username, we need to change the username in the users table, and reassign user comments.

Change the username in the user names table, wp_users

 UPDATE `wp_users` SET `user_login`= replace(`user_login`,"oldname","newname");

Change the comment author fields:

UPDATE `wp_4_comments` SET `comment_author`= replace(`comment_author`,"oldname","newname");

Change the username displayed:

 UPDATE `wp_users` SET `display_name`= replace(`display_name`,"oldname","newname");[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Speak Your Mind

*