When migrating to a new blogging system, one important is to migrate the comments in the posts. If you use Disqus as the comment system, you can use one of the three migration tools they provide to do the job. You can find the three tools through Admin -> Setup -> Migration tools.

Domain Migration Wizard - If the base domain of your website has recently changed, you’ll need to migrate the URLs of your commenting threads to use the new base domain (ex: www.old-url.com -> new-awesome-url.com).
URL Mapper - If the URL slug of your site’s posts has recently changed, you’ll need to use our URL Mapper to migrate your commenting threads from the old URL to the new one (ex: yourdomain.com/p=23 -> yourdomain.com/new-page-slug).
Redirect Crawler - If you’ve already setup 301 redirects for your site’s pages, then use our Redirect Crawler to crawl your site’s pages and migrate the URLs of your commenting threads automatically. Recommended for advanced users only.

For our case ususaly URL Mapper is the best choice. Before using any of the three tools, be sure to check the considerations and limitations on the Disqus website first(especially the second one):

  • If merging two threads together, this cannot be undone
  • The migration tools will not migrate comments to a new Disqus shortname, so be sure to use the same shortname on the new site.
  • Migrations can take up to 24 hours to finish, and we suggest checking its progress occasionally during that time (by looking for the updated comment threads on a page where they did not previously exist).
  • If you’re using a custom disqus_identifier this will still play a role. If two threads are merged into the same URL and have different identifiers as well, the new thread will contain both identifiers

To use the URL Mapper, all you need to do is to upload a csv file which stores all the mapping from the old URLs to the new ones. In Disqus each old thread(comments associated with a post) is identified by an URL. The new URL is the place where you want to move the old thread to. Note that the URL is not necessarily the URL of your post. It is the one specified in the Disqus javascript embedded in the post page:

1
2
3
4
5
var disqus_config = function () {
this.page.url = 'a unique URL for each page where Disqus is present';
// this.page.identifier = 'a unique identifier for each page where Disqus is present';
this.page.title = 'a unique title for each page where Disqus is present';
};

You will find this code in the post page if Disqus is enable on that. The URL of the post is specified by this.page.url.

In order for the mapping to work, you also need to comment out the Disqus identifier. If it is specified in the new page, the identifier(or maybe along with the url?) will be used to search for the thread in the map. Unless the identifier is the same as the old one, the old thread will not show up in the new page.

Other notes

  1. New URL map entries will not override the previous ones unless the same key(old URL) exists in the original map. When you upload a new map, it is always the “append” operation that gets executed.

  2. I failed to migrate the thread in http://eaglesky.github.io/blog/2014/03/25/my-first-blog-post/ to http://eaglesky.github.io/projects/index.html using the above approach. However from my other Disqus comments shown at the bottom of this page you can see the mapping is actually working correctly. I still couldn’t understand why it is not showing up in the new page.

  3. Usually if you do things correctly you can see the thread showing up in the new page as expected very soon after you deploy your website. But it could take hours for the link at the bottom of the page to work.

  4. Maybe we can just use the same Disqus identifier to do the migration?