Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including wp-to-md with all npm packages installed. Try it out:

var wpToMd = require("wp-to-md")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

wp-to-md v1.0.2

Convert WordPress content to markdown using the WordPress API


This tool is designed to download rendered content from WordPress via the API and save it in a local directory as markdown and images. It's a simple solution for moving content from WordPress to a static site generator such as Jekyll, Hugo, Gatsby, or others.


$ npm i -g wp-to-md


$ yarn global add wp-to-md


$ wp-to-md [options]

  -V, --version        output the version number
  -u, --url <type>     WordPress API URL Base
  -o, --output <type>  Output directory (default: "./output")
  -t, --type <type>    Post type to process (default: "pages")
  -n, --number <type>  Maximum number of entries to process (default: 100)
  -h, --help           output usage information


  1. Run yarn install or npm install to install dependencies
  2. Run the utility with yarn start/npm start or node index.js


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free