WordPress Markdown

Not many people know that the WordPress editor supports Markdown. In this article, I’ll demonstrate two ways of using Markdown in WordPress.

Using Markdown while editing

Of if my favorite features is that you can use Markdown to quickly create headers. Simply type something like this, and WordPress will convert it to a proper header. It usually happens right after you hit the spacebar after typing the two hash symbols:

## A header <enter>

In a similar fashion, WordPress will convert anything that is placed between backticks into inline code, for example:

Enter the command `ls -al` to list all the files.

Not everything seems to work though. As of writing this, I was unable to create bold or italics text with Markdown syntax.

Copy/paste Markdown in WordPress

If you copy and paste markdown into the Gutenberg editor, it will automatically convert it to blocks. Links, blockquotes, code snippets, and other formatting are all converted to Gutenberg blocks instantly. And while creating bold and italics text doesn’t work when directly typing it in, it does when you paste Markdown text. Try it for yourself by copy/pasting the following markdown into the editor:

## WordPress supports markdown

This text will be **converted** to Gutenberg blocks. It will even convert links, like this link to [Markdown Land](https://markdown.land).

One thing to watch out for: you need to make sure that the code is pure, plain text. E.g., when you copy code from Visual Studio Code, it adds some formatting, causing the conversion to Markdown to fail.

Keep learning

  • For a quick Markdown formatting reference, check out our Markdown cheat sheet.
  • You might want to take a look at the available WordPress Markdown plugins as well.