# Updating user mentions after user rename

**URL:** https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505
**Category:** Support
**Created:** [Julho 28, 2015, 7:33pm UTC](https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505 "2015-07-28T19:33:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![iamntz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamntz/32/114670_2.png) [@iamntz](https://meta.discourse.org/u/iamntz)
#### Post date: [Julho 28, 2015, 7:33pm UTC](https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505/1 "2015-07-28T19:33:38Z")

</div>

Hi guys.

I have few users to rename on a forum and I also want to update the mentions. There is any chance i can do this with some kind of console magic or something similar?

The usernames that I have to change are pretty unique, and there are zero chances to replace something wrong (unless there is some serialization involved, dunno)

Thanks!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [Julho 28, 2015, 9:34pm UTC](https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505/2 "2015-07-28T21:34:46Z")

</div>

```plaintext
cd /var/discourse
./launcher enter app
discourse remap " @bob " " @bill "

```

but this is a very high risk move, I would back up db first and test it on dev, it performs a global rename on all columns in all tables.

Personally I would just skip doing this or write something custom that only targets mentions.

---

<div class="post-metadata">

### Author: ![iamntz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamntz/32/114670_2.png) [@iamntz](https://meta.discourse.org/u/iamntz)
#### Post date: [Julho 29, 2015, 2:58pm UTC](https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505/3 "2015-07-29T14:58:39Z")

</div>

The usernames that needs to be changed are very unique (i.e. facebook usernames + a random string, from a modifiev version of SSO plugin for WordPress).

Anyhow, I ran the commands and no luck (also rebuild the app), until i realized that it runs better without spaces 😄

So it works fine! Thank you.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Junho 8, 2024, 12:46pm UTC](https://meta.discourse.org/t/updating-user-mentions-after-user-rename/31505/4 "2024-06-08T12:46:08Z")

</div>

Este tópico foi automaticamente fechado após 3237 dias. Novas respostas não são mais permitidas.
