# Merging user accounts

**URL:** https://meta.discourse.org/t/merging-user-accounts/275288
**Category:** Site Management
**Tags:** how-to, merge-user, users
**Created:** [August 15, 2023, 9:01pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288 "2023-08-15T21:01:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [August 15, 2023, 9:01pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288/1 "2023-08-15T21:01:12Z")

</div>

> 🔖 This guide explains how to merge multiple user accounts into a single Discourse account. It covers merging non-staff users through the Discourse UI and merging staff users via the console.
> 
> 🙋 Required user level: Administrator

Merging user accounts in Discourse allows you to combine multiple accounts into a single one. This process can be useful in several scenarios:

1. When a user creates multiple accounts, perhaps due to forgetting their previous registration.
2. If a user creates a new account with a new email address instead of updating their existing one.
3. When a user wants to consolidate multiple accounts used for different purposes (e.g., personal, business, or testing) into a single account.

## Merging non-staff users

Administrators can merge non-staff users directly through the Discourse UI.

> ⚠ This action is irreversible. The source user account will be deleted after the merge.

To merge two non-staff users:

1. Navigate to the user admin page of the source user (the account you want to merge from).
2. Scroll to the bottom of the page.
3. Click the “Merge” button.  
 ![Merge button location](https://global.discourse-cdn.com/meta/original/4X/9/c/3/9c3f74f13f46f771f9bec88221e1ed12310a1b93.png)
4. In the first popup window, enter the username of the target account (the account you want to merge into) and click “Transfer & Delete.”
5. A confirmation dialog will appear. Type the confirmation text shown (e.g., `transfer @source to @target`) and click “Transfer & Delete” to initiate the merge.  
 ![Merge confirmation dialog](https://global.discourse-cdn.com/meta/original/4X/3/4/c/34cea90646f61014cc6cf750027df829a2f77972.png)

> ℹ Merging large accounts can be resource-intensive and may take some time to process, depending on the amount of data associated with the source user.

## What gets merged?

When merging user accounts, Discourse combines data from over 50 tables, including:

- Posts and topics
- Likes given and received
- Personal messages
- User profile information
- User preferences and settings
- User actions and activity (e.g., bookmarks, topic views)
- Badges and achievements
- Trust level and group memberships
- Associated accounts (e.g., social logins)

In case of conflicts, the target user’s details are kept. If both users had an [anonymous user](https://meta.discourse.org/t/enable-and-configure-anonymous-mode/155638) associated with their account, the one owned by the source user will be lost.

> ⚠ Incoming links referencing the source user (e.g., `https://discourse.example.com/t/some-topic/17/3?u=source_username`) won’t be associated with the target user after merging.

## Important note about merging users and [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)

Merging user accounts can potentially impact [DiscourseConnect](https://meta.discourse.org/t/discourseconnect-official-single-sign-on-for-discourse-sso/13045) (formerly SSO), depending on the implementation:

- If [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is based on email address, there should be no issues as long as the target account’s email is used in the [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) system. Note that the source user’s email will become a secondary email on the target account after merging, which may cause login issues if that email is later used with [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true). Consider removing secondary emails after merging if needed.
- If the [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) system uses a unique user ID different from the Discourse user ID, merging could cause issues if the source account’s unique ID is not correctly mapped to the target account.

## Merging staff users

For security reasons, merging staff users must be done via the console.

> ℹ If your site is hosted with Discourse, contact [team@discourse.org](mailto:team@discourse.org) for assistance with merging staff users.

To merge staff users via the console:

```rb
root@host:/var/discourse# ./launcher enter app
root@host-app:/var/www/discourse# rake users:merge['source_username','target_username']

Users merged!

root@host-app:/var/www/discourse#

```

> ⚠ Ensure there are no spaces before or after the comma in the command.

## FAQs

**Q: What happens if the merge process seems to stall?**  
A: If the merge progress screen shows no change for an extended period, try refreshing the page. The merge may have completed, but the UI didn’t update.

**Q: Can I undo a user merge?**  
A: No, once two users are merged, the action cannot be undone. The source user account is permanently deleted after the merge.

**Q: Will merging users affect their posts and topics?**  
A: All posts and topics from the source user will be transferred to the target user. The authorship of these items will change to reflect the target user as the creator.

> Last edited by @Moin 2026-09-14T09:50:47Z
> 
> Last checked by @hugh 2024-07-09T03:47:16Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [March 19, 2025, 1:05pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288/16 "2025-03-19T13:05:06Z")

</div>

A post was split to a new topic: [Merge user button disappeared on my site](https://meta.discourse.org/t/merge-user-button-disappeared-on-my-site/357950)

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [January 2, 2026, 9:36pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288/17 "2026-01-02T21:36:35Z")

</div>

> [@Discourse](#):
>
> Merging user accounts can potentially impact SSO

We also found another tricky situation with merging and SSO.

1. User creates an SSO account at **Organization A** with an email address of [first.last@organizationA.com](mailto:first.last@organizationA.com)
2. The User moves to **Organization B** and creates an SSO account with an email address of [first.last@organizationB.com](mailto:first.last@organizationB.com)
3. We merge the two accounts
  1. The user’s primary email address is now [first.last@organizationB.com](mailto:first.last@organizationB.com)
  2. BUT the merge process leaves [first.last@organizationA.com](mailto:first.last@organizationA.com) as the SECONDARY email address

4. The user moves BACK to **Organization A** , they attempt to sign in via SSO with [first.last@organizationA.com](mailto:first.last@organizationA.com), and they get stuck in the following login loop with this Discourse message: `Slow down, you’re making too many requests`

To fix, we removed [first.last@organizationA.com](mailto:first.last@organizationA.com) from the SECONDARY email address on the merged account in step #3. This created another _new_ account, which we then merged with the [first.last@organizationB.com](mailto:first.last@organizationB.com) account.

We’ve also adjusted our merge process so that after merging, we immediately remove the secondary email address on the account.

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [August 2, 2026, 11:33am UTC](https://meta.discourse.org/t/merging-user-accounts/275288/18 "2026-08-02T11:33:59Z")

</div>

> [@Discourse](#):
>
> If both users had an [anonymous user](https://meta.discourse.org/t/enable-and-configure-anonymous-mode/155638) associated with their account, the one owned by the source user will be lost.

Why is this so? (Why are they not merely merged, too?)

---

<div class="post-metadata">

### Author: ![bluelionman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bluelionman/32/576376_2.png) [@bluelionman](https://meta.discourse.org/u/bluelionman)
#### Post date: [September 3, 2026, 4:47am UTC](https://meta.discourse.org/t/merging-user-accounts/275288/19 "2026-09-03T04:47:04Z")

</div>

I been reading how to merge accounts here but in the forum I am admin off that merge button does not appear next to the Anonymize User button? 🤷‍♂️

---

<div class="post-metadata">

### Author: ![bluelionman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bluelionman/32/576376_2.png) [@bluelionman](https://meta.discourse.org/u/bluelionman)
#### Post date: [September 3, 2026, 12:34pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288/20 "2026-09-03T12:34:59Z")

</div>

When merging accounts which one is kept - how do you insure the right one is kept - do you merge from the one you want to lose or the one you wish to remain?

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [September 3, 2026, 2:39pm UTC](https://meta.discourse.org/t/merging-user-accounts/275288/21 "2026-09-03T14:39:41Z")

</div>

Using the terminology above, the “source” user is deleted and its posts etc are transferred to the “target” user. I did it for the first time the other day and it worked fine.
