[Mediawiki-l] Changing a user's username

Brion Vibber brion at pobox.com
Wed Jul 7 02:13:58 UTC 2004

Matias Pelenur wrote:
> A user on my MediaWiki site would like to change their username. Is that
> possible, or better yet, possible and not too hard? 
> I'm guessing that the value in the user.user_name column for the user would have
> to be changed, and also the title of User page name. Hopefully any other
> references use the userid? Would pages have to be rebuilt?

There's a helper script for this in the maintenance directory: 

Set the oldname and newname variables at the top to the old and new 
names (use spaces, not underscores!) and run it through the mysql 
command-line client or phpmyadmin or whatever you've got to run SQL 
scripts into.

It's a little ugly, but it works (has been used on Wikipedia a number of 

I'd recommend backing up your database before running any manual scripts 
in case you make a mistake; SQL can be unforgiving!

-- brion vibber (brion @ pobox.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20040706/4af1edcd/attachment.pgp 

More information about the MediaWiki-l mailing list