Skip to content

md2wpMarkdown to WordPress

Publish markdown files to WordPress with automatic Gutenberg block conversion and image management

md2wp

Quick Start โ€‹

bash
# Install globally
npm install -g @md2wp/cli

# Initialize configuration
md2wp init

# Publish your first post
md2wp publish my-post.md

Example Markdown โ€‹

markdown
---
title: "My First WordPress Post"
status: draft
tags:
  - tutorial
  - markdown
---

# Hello WordPress!

This is my **first post** published with md2wp.

![Hero Image](./images/hero.png)

- Markdown is converted to Gutenberg blocks
- Images are automatically uploaded
- Links work perfectly

Check out my [website](https://example.com)!

What You Get โ€‹

After publishing, your markdown file is updated with WordPress details:

markdown
---
title: "My First WordPress Post"
wp_post_id: 123
wp_url: https://yoursite.com/my-first-post/
wp_modified: 2024-01-15T10:30:00Z
---

Ready to get started? Follow the installation guide โ†’

Released under the MIT License.