How To Change Your Admin Username In WordPress

When WordPress is installed it sets your login name to “admin” by default. If you want to change it you will usually need to manually edit the WordPress database, which might seem a bit intimidating for people not familiar with MySQL/phpMyAdmin. That’s why I created a small plugin that will let you easily edit your username from within WordPress.

How It Works

The plugin adds a new menu item called “Change Username” to the “Users” menu on the Dashboard. Clicking it will display a form where you can enter your new login name. All you need to do is enter the desired username in the form and click “Save Changes”. The plugin will then automatically perform the required database operations and let you log in with your new username right away.

Download Plugin

change-admin-username.zip (3 KB)
I’ve tested the plugin on WP 2.6 – 2.8.3 but it should be compatible with most older versions, too – all the way down to 2.0.x. If you find any bugs feel free to leave a comment below.

Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
  • Twitter
Related posts :

78 Responses to “How To Change Your Admin Username In WordPress”

  1. 1
    Mr Moo says:

    I’ve been manually changing the username on all of my sites with phpMyAdmin, so this should save me some effort, thanks :)

  2. 3
    Dunn says:

    After we change the username, is it okay to delete or remove the plugin since we are not gonna use it anymore?

  3. 4
    White Shadow says:

    @Dunn – Yes, you can delete the plugin then.

  4. [...] I så fald skal du ind i databasen og ændre det eller bruge det plugin, der findes til at ændre brugernavnet. [...]

  5. The plugin worked perfectly.
    Thanks for the plugin.

  6. [...] Change Admin Username Plugin Tags: WordPress Share: digg_skin = ‘compact’; [...]

  7. 8
    Dr Bikash says:

    Hello White Shadow
    Thanks for the great plug-in.
    I have made an article about it. I have gave you back links to your site. I have also sent you a track back. But I am quite new to the arena. So please dont mind if I have made a mistake.
    To be on safer side I am giving a back link to the exact article that I wrote.

    http://www.drbikash.com/2008/11/17/how-to-change-the-default-admin-username-in-word-press-blog/

    Thanks again for the great plug-in.
    Dr Bikash

  8. 9
    Chetan says:

    Great work man, Thanks a lot for the plug-in.
    Keep working , keep rocking… :)

  9. 10
    Theresa says:

    Just out of curiosity, couldn’t you just create a new user in WordPress and set their permissions to Administer and then delete the Admin?

  10. 11
    White Shadow says:

    Yes, that would work, but it would be inconvenient if you’ve already made a number of posts as admin.

  11. Hi White Shadow. There is a way to do it like Theresa says and attribute all the posts once assigned to admin over to the new user.

    1. Create a new user as an administer.

    2. Log out and log back in with the new administer login (i.e. your new username)

    3. Delete the admin user.

    4. WordPress will ask what you want to do with all the posts attributed to admin. Tell it to link them to your newly created Administer user.

  12. 13
    White Shadow says:

    Hmm, okay then :) Though I still suspect it could cause problems with some plugins and their user-specific records.

  13. I’d be interested to know if it does. If you find out, please comment back again. I’ll stay subscribed to this thread. Thanks White Shadow.

  14. Does this plugin work okay with WP 2.7?

    Thanks
    Steve

  15. Well, I just answered my own question above and your plugin works great with WP 2.7. Thanks so much for creating such an awesome little plugin!

  16. 17
    John Hoff says:

    Hi Steve. As I’m sure you know, security-wise it’s best to delete unused plugins which makes this a nice plugin to use. Install it, change your username, then delete the plugin.

    Question – will you keep it updated in case newer versions of WordPress deem it incompatible? If so, I’ll be sure to refer people to your plugin.

    Thanks

  17. [...] and at least down to 2.5 I believe. I have no affiliation with the developer but here is the link: How To Change Your Admin Username In WordPress | W-Shadow.com Steve P.S. For obvious security reasons, they recommend you uninstall the plugin after using [...]

  18. 19
    White Shadow says:

    @ John : Yeah, I’d probably* keep it updated. :)

    * May require reminding as I’m sometimes too lazy to test all my plugins with each new version of WP.

  19. [...] you’d rather not create a new user then you can always use a plugin. As with any other plugin, you upload it to your /wp-content/plugins/ directory and activate it [...]

  20. 21
    John Burgoon says:

    Thanks for a handy and convenient plugin! Much appreciated.

  21. 22
    romania inedit says:

    Thank you !
    Good luck !

  22. 23
    Jeff says:

    What happens to the owner on the server after changing the username? Currently, the owner of all files on my wordpress sites are either “the-actual-username” or “nobody”. So, changing the username, does that also change the owner in the cases where the file/folder was owned by the old username?

    Jeff

  23. 24
    White Shadow says:

    The file owner should stay unchanged. The user accounts used by WordPress and other server software are usually distinct, even if they might be initially set to the same username for convenience.

  24. 25
    Abuziyad says:

    Very good, It is work good. Thanks for this plugin.

  25. 26
    gwizit says:

    Very Nice

    Was skeptical on trying it since you stated – “I’ve only tested the plugin on WP 2.6″

    So for those still looking – It Works Just Fine on WordPress Version 2.7.1

    Appreciate It White Shadow

  26. 27
    scobot says:

    THANK YOU!!!

    I stupidly just picked something DUMB as my user name thinking “oh well, my display name will be what everyone will see” – then I realized that may not work (maybe it would have) – but I got all stressed out about having to delete my new blog and start all over again! A quick google search for help and I found your post!

    Worked perfectly! Thank you again!

  27. [...] install terlebih dahulu plugin Change Admin Username, dan jangan lupa diaktifkan. Dari admin area silakan klik menu Users dan pilih menu Change [...]

  28. [...] plugin ini sangat kecil hanya sekitar 3 KB (zipped), untuk lebih lanjut silahkan berkunjung ke blog pembuatnya, atau download langsung pluginnya di sini. No Related [...]

  29. [...] change-admin-username : إضافة تستعمل لهذا الغرض ، حمّلها على جهازك وارفعها [...]

  30. 31
    Ashik says:

    This works fine!!!!!!!!!!!!1

  31. 32
    anabasius says:

    That worked beautifully, thank you. :-)

  32. 33
    dlv says:

    works perfect, fast, simply…what more we want ?
    i have to say thank you White Shadow

    adeux!

  33. [...] In: Wordpress plugins 13 Jun 2009 Go to Source [...]

  34. [...] Go here to see the original: ø How To Change Your Admin Username In WordPress | W-Shadow.com ø [...]

  35. 38
    Ray says:

    Hi w-shadow,

    If I remove the admin-only restriction for the “Change Username” page, would anyone be allowed to change their username?

    Also does your plugin do checks to see if a username is already taken? I’m guessing probably not.

    Thanks for reading!

  36. 39
    White Shadow says:

    You are correct – removing the restriction would allow anyone to change their username. And no, it doesn’t check for duplicate username.

  37. 41
    Kenny says:

    It works well with WP 2.8.2 as well, tks!

  38. 42
    Tunde says:

    Hi White Shadow,

    I just wanted to say a very big ´Thank You´for creating this plugin…I´ve spent the last 2 weeks trying figure out how to change my ´admin´ username using phpMyAdmin and just as I was about to give up and pay someone to make the changes for me…I found this post! What luck! It took me 2 minutes to do what I´ve been trying to do for 2 weeks!

    …and just so you know, I´m using the plugin on WP v 2.8.3 and had absolutely no problems installing, activating it and making my changes…I´ll let you know if any problems arise in the future.

    Thanks again for all your hard work..stay blessed :-)

    Tunde x

  39. [...] به آسانی شرح داده است. همچنین دو افزونه WPVN – Username Changer و Change Admin Username برای این کار وجود [...]

  40. [...] به آسانی شرح داده است. همچنین دو افزونه WPVN – Username Changer و Change Admin Username برای این کار وجود [...]

  41. 45
    Rob Fuller says:

    Please contact me, I have a cool feature idea for this plugin that you might find handy as well.

  42. [...] מעניינים, אחד מהתוספים שנתקלתי בהם הוא התוסף הבא שנקרא change admin username מבית היוצר של W-Shadow.com. האמת שלדעתי הרבה משתמשים יאהבו [...]

  43. 47
    luc says:

    thx, i will try it

  44. 48
    harry says:

    Hi shadow…

    I read with intersest about the plug in….I just installed WP and didn’t have a clue about using a different username, so I would like to change the admin name.(used fantistico)….Anyway, I Dl’d the folder, unzipped it, got it into the files on my server….but they are not showing up in the DB….

    thanks

    harry

  45. 49
    White Shadow says:

    I’m afraid your comment is somewhat confusing. Are you sure you installed the plugin correctly? You need to copy the change-admin-username folder to the /wp-content/plugins/ directory and then activate the plugin in the “Plugins” tab of the WP dashboard. Then follow the instructions in the post above.

  46. 50
    harry says:

    Hi WS,

    thanks for replying. I see it in the “plug in” files next to the other ones I DL’d….But when I go to the dasboard, I do not see it listed in the installed section….yet the other plug-ins I have tried do show up. I did unzip it before transferring it with File Zilla, and like I said, the other plug-ins I downloaded do show up.

    Any idea why it does not show up in the dashboard?..

    thanks for taking the time to answer..

    Harry

  47. 51
    White Shadow says:

    This is probably obvious, but have you checked the “Inactive” tab?

    Anyway, it is nevertheless a problem with the installation (it couldn’t possible be a bug in the plugin itself because you haven’t even activated it yet). Maybe the .php file got corrupted during unzipping or the FTP transfer? Try doing it again.

    Another thing you could check is whether the webserver has sufficient privileges to read the plugin file.

  48. 52
    harry says:

    Thanks WP, I will try that tomorrow and get back…

    I think its the corruption angle myself….I’m sure Host gator is fine with privileges as the other plug ins have worked fine…

  49. 53
    Andrei says:

    Thanks. It works. Simple and effective :)

  50. 54
    harry says:

    Hi WS,….Good Morning, I wanted to give you an update and to say thanks. I deleted the plug in, repeated the same procedure( DL to desktop, unzip, FTR through file zilla)….It shows up in my Host gator Files, but did not show up in the WP Dashboard.

    Bur As I was looking at everything, I noticed an upload button in the Dashboard “plug-ins” section which allows you to upload a zipped folder from the PC….. So I did that instead. Installed it, and it worked fine……

    I have since tried other plug ins through FTP, and they all showed up, so it must be some sort of glitch…..

    Bur as long as it’s installed, I’m happy….

    If I can ever help you with RC cars, or anything on my site, let me know….

  51. 55
    White Shadow says:

    Well, I’m glad you got it working.

  52. 57
    ziRta says:

    Hi WS,
    I really appreciate your plugin but it isn’t working for me :( It changed my admin username but now i can’t seem to login neither with the old nor the new username. If I delete the plugin via ftp, can it be fixed?

  53. 58
    White Shadow says:

    Try clearing your cookies first.

    If that doesn’t help, you’ll need to go into the database with something like phpMyAdmin and manually change the username of the appropriate record back to the old value in the wp_users table. Just deleting the plugin won’t be enough.

  54. 59
    ziRta says:

    Been there, done that… I renamed the username back to admin via phpmyadmin, but when I log in, the wp-login.php stays blank… If I type a different username or password, it marks them as incorrect, and insists that my browser is blocking WP’s cookies and I shall activate that -but it is done. The site stays functional, at least. Maybe it’s my fault, i messed around with the .htaccess and things, trying to make the installation safer.

  55. 60
    White Shadow says:

    I’m now more inclined to believe it’s one of those “.htaccess and things”. Changing the username in the DB is the only thing the plugin does, so anything on top of that would be caused by something else.

  56. [...] You may also use a WordPress Plugin to change your username. There are several plugins out there that will help you do this. The plugin I recommend: http://w-shadow.com/blog/2008/07/24/change-admin-username-in-wordpress/ [...]

  57. [...] ของ wordpress เล่นๆ ก็ไปเจอกับตัวนี้ครับ ( Change Admin Username ) ผมว่ามีประโยชน์ทีเดียว [...]

  58. [...] account.  If the idea of deleting that admin account makes you a little uneasy, there’s a simple plug-in that will allow you to just change the username of that account instead of creating a second [...]

  59. [...] I found was a WordPress plug-in written by Janis Elsts appropriately named Change Admin Username. This simple plug-in allows you to change the User ID of the WordPress administrator without [...]

  60. [...] به آسانی شرح داده است. همچنین دو افزونه WPVN – Username Changer و Change Admin Username برای این کار وجود [...]

  61. [...] nome de administrador predefinido sem aceder à base de dados e correr riscos, poderá sempre usar este plugin que lhe permitirá fazer tudo de uma maneira mais [...]

  62. [...] Click here to download directly from the maker’s site. [...]

  63. 69
    Marlin says:

    Thanks i was looking to change my admin login didnt do because it was too confusing This plugin really made it easy thanks

  64. 70
    Marlin says:

    Thanks i was looking to change user name didnt know how to do it

  65. [...] ci viene in soccorso il plugin “change admin username” che in pochi secondi ci permette di cambiare la username [...]

  66. 72
    pimpi says:

    Great idea, tried with wp 2.8.6 but it seems not to work ;-( Will wait for upgrade! Thanxs.

  67. 73
    pimpi says:

    SORRY! was in the wrong folder. It works with 2.8.6!! Great thankyou!! Next round’s on me!

  68. [...] Change Admin Username: l’admin di default non è il massimo per la [...]

  69. 75
    Heather P. says:

    Hi there, this plugin worked perfectly! Except when I post a new blog onto my website, it still names the author as the “admin” username, not as my new username that I created with the plugin. Is there a fix for this? Thanks!

    Heather

  70. 76
    White Shadow says:

    You might need to change the “Display name publicly as” setting in Users -> Your Profile.

  71. 77
    Irene S says:

    Thanks, this is just what I was looking for. Worked easily and perfectly. Love it!

    Irene

  72. 78
    Jake says:

    Great Plugin, works great!

Leave a Reply