# Bulk move many topics from one category to another

**URL:** https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704
**Category:** Support
**Created:** [January 29, 2016, 1:54pm UTC](https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704 "2016-01-29T13:54:15Z")
**Posts on this page:** 4
**Page:** 1

<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: [January 29, 2016, 1:54pm UTC](https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704/1 "2016-01-29T13:54:15Z")

</div>

Is there a query to bulk move many topics from one category to another? I want to consolidate many categories into one category and would like to make the move quickly and all at once, and also not bump the topics.

Bonus: also want to tag topics first with a category-equivalent tag before moving them.

Grateful for any queries or recipes. Many thanks! I’d even write it up as a #howto topic if it’s good. 🙂

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [April 4, 2022, 10:52pm UTC](https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704/34 "2022-04-04T22:52:19Z")

</div>

I’ve gone ahead and cleaned up this topic and have added the current best options for solving the questions in the OP. If there’s anything missing or if you notice and issues, please feel free to respond.

⚠ Take backup before you make major bulk changes just in case…

## Bulk tag/move topics through the UI:

For small categories, or subsets of topics, the bulk selection tool may be enough (see note at the end of this posts on notifications).

 ![Screen Shot 2022-04-04 at 3.45.07 PM](https://global.discourse-cdn.com/meta/original/3X/1/a/1ab06f96563ee96623df26a9e0cb2e5106f0ae83.jpeg)

 ![Screen Shot 2022-04-04 at 3.45.21 PM](https://global.discourse-cdn.com/meta/original/3X/5/0/506abd82209271008a8442913c7f247f19433c03.jpeg)

 ![Screen Shot 2022-04-04 at 3.45.35 PM](https://global.discourse-cdn.com/meta/original/3X/6/5/65968a5be089c9ab2376afd8832f74b888d8f689.jpeg)

## Move all topics from one category to another

First enter your site’s container:

```plaintext
cd /var/discourse
./launcher enter app

```

> [@Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349/1):
>
> Find the category IDs with the following rake task:
> 
> ```plaintext
> rake categories:list
> 
> ```
> 
> The first value should be the starting category ID. The second value should be the destination category ID.
> 
> ```plaintext
> rake categories:move_topics[15,6]
> 
> ```

* * *

## Bulk Tag All Topics Within a Category:

First enter your site’s container:

```plaintext
cd /var/discourse
./launcher enter app

```

> [@Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349/1):
>
> Template: `rake tags:bulk_tag_category["<tag>|<tag>",<category_id>]`  
> This would be particularly useful when trying to convert a category to a tag.
> 
> First, use the following rake task to find the relevant category ID.
> 
> ```plaintext
> rake categories:list
> 
> ```
> 
> Tag all topics of the category you specify. In this example, you would be tagging all topics in the category with an ID of 6 with the “support” tag. ⚠ this will remove all other tags from each topic.
> 
> ```plaintext
> rake tags:bulk_tag_category["support",6]
> 
> ```
> 
> Append all topics of the category you specify. In this example, you would be adding the “support” tag to all topics in the category with an ID of 6, while keeping existing tags.
> 
> ```plaintext
> rake tags:bulk_tag_category["support",6,true]
> 
> ```

* * *

I’m not 100% sure what types of notifications if any these methods trigger, but if you are concerned and want to be absolutely sure that notifications aren’t sent out, I would recommend checking the following settings while working on this:

- `disable_category_edit_notifications`
- `disable_tags_edit_notifications`

---

<div class="post-metadata">

### Author: ![Thien\_Nguyen\_Ngoc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thien_nguyen_ngoc/32/316503_2.png) [@Thien\_Nguyen\_Ngoc](https://meta.discourse.org/u/Thien_Nguyen_Ngoc)
#### Post date: [September 14, 2023, 8:39am UTC](https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704/35 "2023-09-14T08:39:22Z")

</div>

@tshenry you just saved my day! Thank you so muchhhh

---

<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: [October 14, 2023, 8:39am UTC](https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704/36 "2023-10-14T08:39:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
