Why can’t I update username through WordPress API?

Looking on Trac I found a ticket that discusses exactly this issue: Administrator should be able to change usernames

This is what it all boils down to:

Changing usernames could break permalinks

To prevent this a lot more than just changing the username in the DB would need to be done. E.g. redirection from old usernames.

Caching Issues

I quote from the aforementioned Ticket:

“One problem you could get, if you do this using the db while using
memcached, is the the old value remains in the store until memory runs
out.”

Denis-de-Bernardy

TL;DR

It may cause various problems and therefore is intentionally difficult to do.
In case you think of this differently fell free to join the discussion in the corresponding ticket.

Leave a Comment