0

Does WordPress store the username as a primary key in the table in the database? I'm wondering why WordPress prevents admins from changing their username and this is the only thing I can think of.

PS There are many valid reasons to change a username. For example, the easy install program created a WordPress install and used the default username "admin".

3
  • 2
    No, the primary key is a numeric ID. You can easily see that in the database. Is that really a question?
    – fuxia
    Aug 22 '17 at 5:52
  • it is probably for security purposes, but you can change it via the database. In future, maybe just create a new admin account and delete the other after using an installer.
    – deflime
    Aug 22 '17 at 8:02
  • @Toscho Can you add this as an answer? FYI I have limited access at the moment Aug 22 '17 at 9:09
2

WP is not likely going to add this feature...

From https://core.trac.wordpress.org/ticket/14644, the main reason given by Nacin is:

This is a caching issue. Additionally, it also breaks URLs and such, which is why I don't think administrators should be able to do it either. Seems simple enough to relegate to a plugin, or a straight DB edit. Suggesting wontfix.

3
  • Thanks for the info and the link. I can understand the reasons not to but in the other hand there are perfectly valid reasons and WordPress.com has this option. It might be good reasons for a user but admins, in my humble opinion, should have this option. Aug 22 '17 at 13:08
  • Yep I understand your point, but that would bring really unwelcomed complications if it's being added to core which has to stay the most simple possible.
    – ClemC
    Aug 22 '17 at 13:13
  • Does WordPress itself create plug-ins? If they don't maybe they can consider it. That way they can add these features while keeping the core small in size. Aug 22 '17 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.