# Moving posts into an existing topic doesn't keep chronology

**URL:** https://meta.discourse.org/t/moving-posts-into-an-existing-topic-doesnt-keep-chronology/21392
**Category:** Feature
**Tags:** completed
**Created:** [October 21, 2014, 11:45pm UTC](https://meta.discourse.org/t/moving-posts-into-an-existing-topic-doesnt-keep-chronology/21392 "2014-10-21T23:45:42Z")
**Posts on this page:** 1
**Showing post:** 36

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [October 26, 2021, 9:18pm UTC](https://meta.discourse.org/t/moving-posts-into-an-existing-topic-doesnt-keep-chronology/21392/36 "2021-10-26T21:18:59Z")

</div>

> [@supermathie](#):
>
> There is a rake task to do this

I had a need to use this for some email threads that were split into separate topics during import so I thought I would elaborate on this in case anyone else also needs it. You’ll need to be able to access the command line on the server running your Discourse instance.

Start by moving all the desired posts into the target topic, then get the topic ID. In the address bar you might see something like the following, where the topic ID is 24855:  
`/t/topic-slug/24855/9`

On your server, enter the Discourse app with the following commands. You may need to clear some space if you have less than 5GB available.

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

```

If that is successful, you can then reorder the posts by their timestamps with the following command, replacing the topic ID as appropriate.

```plaintext
rake posts:reorder_posts[24855]

```

---

_[View the full topic](https://meta.discourse.org/t/moving-posts-into-an-existing-topic-doesnt-keep-chronology/21392)._
