Using Markdown with WordPress

Since writing this article, Michel Fortin has announced that he is going to stop including WordPress plugin functionality in Markdown Extra. Click here to read a more recent article that explains how to cope with this news.

I’ve noticed that I’ve been getting hits for Markdown-related searches on Google, ever since I wrote a blog post about the browser extension called Footnotify. When I saw Footnotify I instantly knew I wanted to have that functionality on my own website, and so I started searching for a WordPress plugin that provided footnotes. Eventually, I decided that it would be worth using Markdown to achieve this effect, after seeing the footnotes on Daring Fireball, and set about getting this arranged.

The first step was finding a way to install Markdown on WordPress1. I searched on the website for an extension to do this, but couldn’t find an ‘official’ one, so I searched on Markdown-Discuss (the mailing list set up by John Gruber) to see whether I was mistaken. It turned out I was, although the plugin that I’d recommend isn’t listed on the WordPress website: since WordPress is based in PHP, and since Michel Fortin has written Markdown Extra for PHP, one can just download PHP Markdown Extra from his website and upload it to WordPress as a plugin.

A screenshot of an FTP client displaying the file path of PHP Markdown Extra in my WordPress configuration.

The process is easy. Once the zip file has downloaded, simply unzip it. You’ll be presented with a folder containing three files: two in .text format (one of the accepted file extensions for plaintext files that contain Markdown syntax) and one PHP file. I renamed the folder to php-markdown-extra and then uploaded it to my WordPress installation (the filepath is wordpress/wp-content/plugins). WordPress then sees this as a plugin, and so you’re ready to roll!

But what should you use to edit your Markdown text? Initially, I tried a Mac app for Markdown called Valletta, which didn’t impress me. One of the key features of Markdown that I adore is its ability to turn -- into — and turn 'typewriter quotation marks' into ‘typographic quotation marks’. Valletta doesn’t implement this part of Markdown, so I don’t recommend it. However, the beauty of Markdown is that it’s just plain text with specific syntax, and so you can feel free to use the plaintext editor of your choice. Personally, I flit between Textwrangler, on the Mac and Notepad++, on Windows. Both apps can be configured to highlight Markdown syntax2, and I’m actually using TextWrangler to write this post.

A screenshot of this article, being rendered by Elements, the iOS plain text editor.

Although I don’t use a specific app on my computers, I have http://www.mindanews.com/buy-inderal/ found a rather good app on my iPhone. An iOS app by the name of Elements, it started life as a simple plaintext editor that supported Dropbox as a filesystem, but has since gained the ability to preview Markdown-formatted text and also copy the HTML generated as a result, for use in other apps.3 Elements is really good in a variety of ways: Dropbox sync is chief amongst them, but the ability to choose what file extension you give to Markdown files is also a very nice touch. It allows you to choose which folder on your Dropbox you want to synchronise4, too. Find it on the App Store here (£2.99/$4.99).

Lastly, let’s return to Footnotify. Markdown Extra allows for easy footnote creation, and Footnotify complements this brilliantly — I use both the Chrome extension and the JavaScript that provides the overlays on this blog. It will work whether you’re using Markdown on your blog directly or generating footnotes on your own. If you like what it’s doing for your browsing experience on my blog, you should definitely download it and give it a try with your own website!

I am glad that I got the desire to try Markdown because I feel it really has enhanced my writing. For me, the main benefits are the syntax, which makes certain tasks (bullet points, linking, footnotes) much easier. For the reader, the better formatted text brings something to the design of the website, whereas the footnotes mean that my frequent desire to wander off the topic is nowhere near as aggravating as it might be. I’d definitely recommend Markdown to anyone who writes online, even if it’s relatively infrequently.


  1. If you’re using WordPress.com, installing plugins is not possible and so this won’t apply to you — sorry! However, you can still use a Markdown app to export HTML and paste it into WordPress, so keep reading. 
  2. Notepad++ may need you to roll a user-defined language definition, but there are such things available online. There’s even this handy article on how to generate HTML from Markdown
  3. I mostly use this feature when posting to my LiveJournal, but if you’re running a WordPress.com blog then it will also be very useful! 
  4. I have all my text files in a folder called PlainText, named after the free editor that also syncs with Dropbox. I recommend that one, if you’re just looking for an editor without Markdown editing. Find it on the App Store here (free). 

Footnotify and a site redesign

Recently I found a really cool Chrome extension called Footnotify, which takes footnotes (as you see them on Daring Fireball or Wikipedia) and renders them as a hovering box when you click them. If you are a regular reader of either site (or, indeed, a plethora of others) you too might find it handy.

The extension’s elegance and ease of use made me want to put footnotes on my website, too, and so I started fiddling with various footnote extensions for WordPress. Eventually, I got a little disillusioned, since none of them were working quite how I wanted — as a result I sought out PHP Markdown Extra, which includes footnotes and also a host of other neat ways to write online. It’s based on the syntax developed by John Gruber, who runs Daring Fireball, and so the footnotes it generates are guaranteed to work with Footnotify, right?

Wrong. The WordPress theme I was using completely screwed footnotes up, and so I went hunting for a new one. I had been using The Unstandard, which is the theme I’ve successfully implemented and used over on the Leicester Sabres website. It’s a very good theme that’s very visually powerful — for the Sabres, that means that we draw people into the site and get them reading. However, I don’t really do my website for the hits, and so I’m unsure that the very visual theme was suitable. I ended up looking for a new, simple, one-column theme1 and eventually found Blaskan, which is now in use on the site.

As a result, I’ve installed a new plugin ([Markdown Extra]) and installed a new theme (Blaskan). However, they aren’t the only changes, since Blaskan also has good support for smartphones and as a result I no longer need the plugin that enabled the mobile view I previously employed. Good news all round!

There’s one small problem — for some reason, Footnotify doesn’t work properly on the individual blog entries. If you click a footnote on the main homepage it’ll work fine, but on the page for this post, it’s broken. I installed the JavaScript that enables it on a website, in case having it on the site rather than as a Chrome extension was helpful, but that hasn’t changed anything; I’ve gotten in touch with the author and hopefully this will eventually be resolved.

Edited to add: Initially, I had a problem with Footnotify. It would work fine on the homepage, but on the entries’ pages themselves, it didn’t work correctly. After sending a missive to Michel Fortin, I was able to identify it as an issue with a plugin on my website. Something was causing the relative footnote links generated by [Markdown Extra] to become absolute links, and thus breaking the Footnotify plugin. After some trial-and-error, it turns out that it was an issue with Joost de Valk’s Google Analytics for WordPress plugin. I visited de Valk’s website, where I read:

For plugin support, please use the appropriate support forums on WordPress.org. Plugin support emails will be immediately discarded. The only reason the option in the contact form below is there, is so I can more easily filter away those emails for those who don’t bother to read this text.

As such, I couldn’t be bothered to notify him of the bug in his plugin, and am instead using a plugin called Google Analytics which is much simpler to configure and works perfectly for what I need it to do. And now, footnotes work how they should — hurray!


  1. The eagle-eyed amongst you will have noticed that this theme is not one-column, since it has a sidebar. You’re entirely correct to notice that, but Blaskan can be configured to be one-column and so appears in several lists of such themes.