User Error/Question.


Well-known member
Someone on my site posted something they shouldn't have. Their friend (whom they'd posted about) saw it and was very upset. User contacted me and asked my to remove his account, which I did. But his name is still associated with all his other posts and there's no easy way to change them as his account was already deleted.

What command can I put in the SQL to change the name on all his posts?


XenForo moderator
Staff member
Ideally you should do any user name changes before deleting accounts, as it is much more difficult to do it afterwards.

Try this, but take a backup first!

UPDATE xf_post SET username = REPLACE(username,'Original_Username','New_Username')