Further notes on Markdown and WordPress

For a long while, my blog post on one of Amanda Palmer’s Kickstarter projects was my most popular blog post, thanks in no small part to AFP herself tweeting a link to it, providing a very nice uptick in my hits for the day! However, a different blog post recently overtook it — I am, as you’ve almost certainly worked out from this post’s title, talking about my previous blog post about using Markdown with WordPress, which I’m happy to see is proving to be useful to so many people.

However, things have changed in the way I use Markdown with WordPress since then. Michel Fortin has announced that his PHP Markdown Extra will no longer be updated as of 1 January 2014. He’s introduced PHP Markdown Lib 1.3 to replace it, partly because he no longer wants to maintain the WordPress elements. This is fair enough, but it introduces a fly to the ointment. One annoying thing about PHP Markdown Extra is that, if you have it installed on WordPress but then deactivate it or uninstall it, your blog no longer knows how to handle Markdown. This results in all of your blog posts displaying raw Markdown, rather than the HTML that they should show to visitors. Therefore, when a plugin is depreciated, it can be a real pain in the backside to get everything back to where it was.

As a result, as a WordPress user I have been casting around for a replacement for PHP Markdown Extra that won’t create the same problem if you need to deactivate it. I am here to tell you I believe I’ve found something that fits the bill perfectly.

An image showing the Markdown on Save Improved pane in the WordPress editor.

I’d like to recommend Markdown on Save Improved as a solid replacement for PHP Markdown Extra on WordPress. It addresses the concern I’ve outlined above very elegantly, by maintaining the database of Markdown separately to the database of blog posts. This means that if you write a blog post in Markdown and then uninstall it, the blog post will still display as HTML to the audience of your website — obviously a huge improvement over the ‘naked’ display that could occur with other Markdown plugins.1 Markdown on Save Improved is maintained by Matt Wiebe, who works for WordPress.com’s parent company Automattic — which presumably means he knows his stuff — and uses PHP Markdown Extra to parse Markdown, so it should produce identical output.

Markdown on Save Improved has one major drawback: when I installed it, it didn’t know which of my posts were Markdown and which were not, so I had to trawl through my database and hit ‘Update’ on each post. Whilst this isn’t a huge problem for someone like me who has a relatively small number of blog posts, someone who has more might find it a little clunky. Also, it assumes that you want to use Markdown every time you create a new blog post; perfect for me, but not great if you don’t want it to do that.2

What else has changed about my use of Markdown in the time since I wrote my original post? Whilst I’m still using the same beloved TextWrangler to edit my Markdown, I’m now using it in conjunction with the excellent Marked, which works with any text-editing app. The way it works is simple: you set your .md files to open in Marked, and then when you open them you see the rendered text displayed. Hit ⌘E and it’ll open the source in your editor of choice. Whenever you save the file in the editor, not only will Marked update the display, but it’ll indicate the paragraph of your latest edit so you can instantly focus on where your changes are appearing. It’s an incredibly elegant and useful app, and a snip at £2.49 on the Mac App Store.

So, in summary, go check out Markdown on Save and Marked. Both are incredibly useful tools that will make your Markdown even easier to write than it is at the moment.

A screenshot of this blog post and what it looks like in Marked.


  1. It’s also, I think, a huge improvement over WP-Markdown, which converts your Markdown to HTML when you save a blog entry and then converts that HTML back into Markdown when you come back; there are a couple of threads on that plugin’s support board that complain about this process badly mangling their Markdown and making it much harder to work with. 
  2. There is an alternative plugin called Markdown on Save, coded by Mark Jaquith, which is the plugin that Improved is based upon. This means you turn the option on for each blog post, rather than having to turn it off for each one. It’s prettier, but it contains a bug which causes footnotes to break on any WordPress page which displays more than one blog post (such as the front page or any category’s page). That’s why I’m not using it. 

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).