Renaming a user

User’s internal company wide system ID changed and now he wants to use it to log into an internal WordPress blog. The gui declares “Usernames cannot be changed”. Right.

Everyone who administers a WordPress blog should spend a little time getting to know its database schema.

To change someone’s username all you have to do is update the appropriate table in the database.

mysql> update wp_users set user_login = 'novamundo' where ID = '99';

Where user_login is the field that holds the displayed username and ID is the unique internal numeric identifier for the user’s account.

While you’re at it you could also change the user’s nickname, e-mail address, password, etc.

Why this information isn’t readily available in the WordPress documentation or the support forums is beyond me.

Well, not really. Most people who work with WordPress don’t have shell access, and even if they did would be gripped with fear at the sight of a mysql prompt. If your site is on a provider who doesn’t allow shell access you’re going to be forced to go back and study all those work-arounds in the forums ( does give you the ability to change your username via their account management gui). That’s too bad, because I think they’d find that being able to navigate around the underlying system would make their lives infinitely easier.

This entry was posted in Database, System Administration, Web on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).