---
title: "SimplyIrfan Markdown"
id: "7328"
type: "page"
slug: "wp-markdown"
published_at: "2026-09-29T12:14:58+00:00"
modified_at: "2026-10-02T05:34:43+00:00"
url: "https://simplyirfan.com/wp-markdown/"
markdown_url: "https://simplyirfan.com/wp-markdown.md"
featured_image: "https://simplyirfan.com/wp-content/uploads/wp-markdown-by-simplyirfan.jpg"
featured_image_width: "1672"
featured_image_height: "941"
featured_image_id: "7330"
featured_image_alt: "SimplyIrfan Markdown WordPress plugin showing HTML and Markdown content with .md URLs, clean content, YAML front matter, and AI agent support."
featured_image_caption: ""
featured_image_mime: "image/jpeg"
featured_image_filesize: "139828"
---

WordPress plugin · Created by Irfan

# Turn WordPress content into Markdown

SimplyIrfan Markdown gives your WordPress posts and pages clean Markdown representations with **.md URLs** and **text/markdown** content negotiation.

[Get SimplyIrfan Markdown](#install)
[Test it with curl](#testing)

Keep publishing in WordPress. Serve HTML to people and Markdown to developers and AI agents.

terminal

```
$ curl -H "Accept: text/markdown" https://example.com/my-post/

---
title: "My Post"
author: "Irfan"
date: "2026-09-29"
---

# My Post

Your WordPress content, represented as clean Markdown.
```

## One WordPress source. Multiple representations.

SimplyIrfan Markdown works from your existing WordPress content instead of making you maintain a separate Markdown publishing workflow.

01

### Install the plugin

Add SimplyIrfan Markdown to your WordPress website.

02

### Publish normally

Keep creating posts and pages exactly as you already do.

03

### Serve Markdown

Use a `.md` URL or request Markdown from the normal URL.

## One URL. Two representations.

The normal WordPress URL remains HTML while clients that request Markdown can receive a machine-readable representation.

### Normal browser request

```
GET /my-post/

→ Content-Type:
  text/html; charset=UTF-8
```

### Markdown request

```
GET /my-post/
Accept: text/markdown

→ Content-Type:
  text/markdown; charset=UTF-8
```

## Built for AI agents and developers

Expose the content layer without forcing clients to scrape your presentation layer.

### .md URLs

Provide predictable Markdown URLs for supported WordPress content.

### Content negotiation

Support `Accept: text/markdown` requests on normal URLs.

### YAML front matter

Expose useful document metadata alongside the Markdown content.

### Featured images

Preserve featured-image information in the Markdown representation.

### Clean content

Remove unnecessary article presentation chrome from the Markdown output.

### WordPress native

Your existing WordPress publishing workflow remains the source of truth.

## Keep WordPress. Add Markdown.

You don't need to create a second copy of your content. SimplyIrfan Markdown generates the Markdown representation from your existing WordPress posts and pages.

```
WordPress
   ↓
SimplyIrfan Markdown
   ↓
HTML + Markdown
```

## See the Markdown output

Metadata and content are presented in a format that's straightforward for developers and machine consumers to process.

```
---
title: "Example Article"
author: "Irfan"
date: "2026-09-29"
featured_image: "https://example.com/image.webp"
---

# Example Article

Your WordPress content appears here as clean Markdown.

![Featured image](https://example.com/image.webp)

## A heading

A paragraph, a list, links, tables and other supported content.
```

## Test it from your terminal

These curl commands let you verify the three core delivery modes and inspect the actual response headers and body.

### 1. Test the .md URL

```
curl -I https://example.com/my-post.md
```

### 2. Test normal HTML

```
curl -I https://example.com/my-post/
```

### 3. Test content negotiation

```
curl -I \
  -H "Accept: text/markdown" \
  https://example.com/my-post/
```

### 4. Test the Markdown body

```
curl \
  -H "Accept: text/markdown" \
  https://example.com/my-post/
```

### 5. Test the explicit Markdown URL

```
curl https://example.com/my-post.md
```

### 6. Windows PowerShell / CMD

```
curl.exe -I "https://example.com/my-post/"

curl.exe -I -H "Accept: text/markdown" "https://example.com/my-post/"
```

### ⚠️ Using a WordPress cache plugin?

Page caching can affect `Accept: text/markdown` content negotiation. A cache may store the normal HTML representation and return that cached response before WordPress and SimplyIrfan Markdown can process the request.

For Markdown negotiation to work, the request must be allowed to reach the plugin:

- Purge the page cache before testing.
- Check whether your cache supports conditional bypass based on the `Accept` header or otherwise respects `Vary: Accept`.
- Make sure the cache cannot return an existing HTML representation for a Markdown request.
- Check your cache plugin's documentation for content-negotiation compatibility.

**Important:** Simply excluding a URL from page caching can make Markdown work, but it can also remove caching for normal HTML visitors. The desired setup is cached HTML for ordinary requests and a cache bypass for Markdown requests.

## Troubleshooting at a glance

| Test | Expected result | If it fails |
| --- | --- | --- |
| /my-post/ | text/html | Check normal WordPress/page-cache configuration. |
| /my-post.md | text/markdown | Check plugin activation and rewrite rules. |
| /my-post/ + Accept: text/markdown | text/markdown | Check whether a page cache is serving HTML before WordPress. |
| Markdown request returns HTML | Markdown response | Purge cache and inspect cache bypass/content-negotiation support. |
| HTML becomes uncached | Normal HTML can remain cached | Review broad page exclusions; the Markdown bypass should be request-specific. |
| First request works, later request returns HTML | Consistent Markdown response | The cache is likely storing or re-serving the HTML representation. |

## Frequently asked questions

Does this create duplicate WordPress posts?No. The Markdown representation is generated from the existing WordPress content.

Does the normal URL still return HTML?Yes. Normal browser requests continue to receive the regular HTML representation.

Can I use .md URLs?Yes. Supported content can be requested through its Markdown URL.

Can I request Markdown from the normal URL?Yes. Send an HTTP `Accept: text/markdown` header.

Does this require a separate Markdown editor?No. Your existing WordPress editor and publishing workflow remain unchanged.

Does it replace WordPress?No. WordPress remains the publishing system; the plugin adds a Markdown representation of your content.

Why does a cache plugin matter?Full-page caches can return a stored HTML response before WordPress processes a request. Content negotiation therefore needs a cache configuration that allows Markdown requests to bypass the HTML representation.

## Give your WordPress content a Markdown representation.

Publish once. Serve HTML to people and Markdown to developers and AI agents.

[Download WP Markdown Plugin](https://wordpress.org/plugins/simplyirfan-markdown/)

## Structured Data

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "SimplyIrfan Markdown",
    "description": "",
    "url": "https://simplyirfan.com/wp-markdown/",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://simplyirfan.com/wp-markdown/"
    },
    "datePublished": "2026-09-29T12:14:58+00:00",
    "dateModified": "2026-10-02T05:34:43+00:00",
    "author": {
        "@type": "Person",
        "name": "Irfan",
        "url": "https://simplyirfan.com/author/simplyirfan/"
    },
    "publisher": {
        "@type": "Organization",
        "name": "SimplyIrfan",
        "url": "https://simplyirfan.com/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://simplyirfan.com/wp-content/uploads/cropped-simplyirfan-logo-new.png"
        }
    },
    "isPartOf": {
        "@type": "WebSite",
        "name": "SimplyIrfan",
        "url": "https://simplyirfan.com/"
    },
    "image": {
        "@type": "ImageObject",
        "url": "https://simplyirfan.com/wp-content/uploads/wp-markdown-by-simplyirfan.jpg",
        "width": 1672,
        "height": 941
    }
}
```
