DEV Community

Cover image for Migrating Posts from Medium to DEV
Lu-Vuong Le 🚀
Lu-Vuong Le 🚀

Posted on

Migrating Posts from Medium to DEV

Hi Everyone! 👋

As I create blog posts, I typically use multiple platforms aside from DEV such as Medium.

Now I have had some posts on Medium in the past that I wanted to move onto DEV. The problem was I didn't want to rewrite the posts on Medium to markdown for DEV, which would require a bit of effort.

Thus began my search for a way around this which led me to stumble onto this awesome tool!

How to migrate posts ❓

The tool I used is Medium Exporter. In order to use this, you can install this npm package globally via:

npm i -g mediumexporter
Enter fullscreen mode Exit fullscreen mode

Now you should be able to run the following command to convert a medium post into an MD file

Format: mediumexporter [url] > [filename].md

mediumexporter https://medium.com/@coderarchive/4-lessons-ive-learned-during-my-first-year-as-a-software-engineer-50bc95afd629 > 4-lessons.md
Enter fullscreen mode Exit fullscreen mode

Note: If you don't have it installed globally, you can also use npx which is what I'm using in the example below :)

Running the command

Demo CLI 1

View the file

Demo CLI 2

There may be some changes to make as it doesn't always convert everything correctly and you'll possibly need to deal with any images yourself but it usually helps with most of the work 👌


That about wraps it up for this short one! I'm also aware there is are some chrome extensions and other npm packages to do this as well but I haven't tried them out yet, this way seems to work well enough 😁

Top comments (2)

Collapse
 
stevescruz profile image
Steve Cruz

This is a good tip. I have some posts in Medium and this will be useful. Thanks for sharing!

Collapse
 
coderarchive profile image
Lu-Vuong Le 🚀

Glad it was helpful!