How to properly change username via MySQL?



I have an external application that needs to update usernames in XenForo. I thought it was as simple as updating xf_user to change the 'username' field, but it appears that old posts made by the user still have their old name and profile link on the forum index page. When you click the profile link, it does properly redirect to their new username profile, but I'd rather always show the correct name and link. Thanks.


Well-known member
So it's impossible then?

If you are doing it programatically. Your best bet is to initialize the autoloader and call the data writer. If you are doing it manually then you are going to have to run rebuilds in the control panel afterwards to update everything. I haven't looked at Xenforo's database in awhile but I know in vB the username not just the userid is saved in the posts. So every post for example has to be update. Which isn't a hard query to accomplish but its not just posts its all sorts of stuff.

There is no easy way out. There is the manual way, the hard way to code it and the proper way to code it which is a lot more likely to survive version changes.