zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

Migrating posts from WordPress

#writing/guide #reference

Last updated: 08/05/2021

This zettel describes the process that I used to migrate content from my old WordPress site to markdown.

H2 Prerequisites

Node.js, which you can download here.

NPM for managing JS libraries.

A copy of wordpress-export-to-markdown. In the wordpress-export-to-markdown directory, run npm install to install dependencies.

H2 Exporting

First, in the WordPress admin panel, go to Tools > Export. Choose “All Content” and hit “Download Export File”. It will take some time for the xml file to download depending on the size of the WordPress site.

Then, rename the downloaded file to export.xml

H2 Converting

Navigate to the wordpress-export-to-markdown directory and run node index.js .

Specify the path to export.xml as prompted.

Specify the output folder.

Answer additional options prompted by the script according to your preference.

The script will run and images from the WordPress site will be automatically downloaded.

Done :D


References

  1. https://kevq.uk/how-to-convert-wordpress-to-markdown/
  2. https://github.com/lonekorean/wordpress-export-to-markdown