Change ownership of all posts by a specific user

Want to change ownership of all the posts by a specific user? Let’s do it!

:discourse: If your site is hosted by Discourse, please reach out to our support team at team@discourse.org if you need to change ownership of all posts from a user.

Access Your Site

First connect to your Droplet via SSH, and enter the Docker container for your Discourse instances:

cd /var/discourse
./launcher enter app

Change ownership of all public posts

rake users:change_post_ownership["old_username","new_username"]

The above command will transfer ownership of all public topics/posts by @old_username to @new_username.

Change ownership of all private posts

rake users:change_post_ownership["old_username","new_username",private]

The above command will transfer ownership of all private messages (topics/posts) by @old_username to @new_username.

Last edited by @JammyDodger 2024-05-25T11:16:19Z

Check documentPerform check on document:
22 Likes