WordPress plugin to export your posts to Markdown format with a single click.
Markdown Page Exporter is a lightweight and powerful WordPress plugin that allows you to export your articles to Markdown format with a single click. Perfect for:
- ๐ Migrating content to other platforms that support Markdown
- ๐ Creating text backups of your posts, without HTML dependencies and with a format that will last over time, independent of WordPress
- ๐ค Feeding artificial intelligence systems (ideal format for LLMs like ChatGPT, Claude, etc.)
- ๐ Archiving content in standard and portable format. Readable by any text editor (Notepad, VS Code, Obsidian, etc.)
- โ๏ธ Reworking your articles in Markdown editors
- Quick Copy: Single click on the main button to copy Markdown to clipboard
- Preview Display: Dropdown menu to view Markdown before copying
- Professional Conversion: Uses Turndown 7.2.2 library (the most used and reliable for HTMLโMarkdown)
- Accurate Title: Uses official WordPress API to always get the correct post title
- Universal Compatibility: Works with any WordPress theme
- Zero Configuration: Install, activate, and it works immediately. No configuration. No database.
The plugin uses Turndown, the most reliable JavaScript library for converting HTML to Markdown. Supports:
- โ Headings (H1 to H6)
- โ Bold and italic
- โ Links (with optional titles)
- โ Images (with alt text)
- โ Ordered and unordered lists (including nested)
- โ Complete tables
- โ Blockquotes (including nested)
- โ Inline code and code blocks
- โ Horizontal rules
- โ Paragraphs and line breaks
Minimalist Design: discreet button in the top right of the post that doesn't distract.
- ๐จ Modern dropdown menu: Clean and professional interface
- โก Quick Copy: Main action with a single click
- ๐ฑ Responsive: Perfect on desktop, tablet, and mobile
- ๐ฏ Optimal positioning: Above content, aligned right
- ๐ฌ Visual feedback: Toast notifications to confirm actions
- ๐ฑ๏ธ Dual click area: Main button (copy) + arrow (menu)
โฌ๏ธ Download Latest Release (1.0.0)
Then upload to WordPress via Plugins โ Add New โ Upload Plugin.
- Download
markdown-page-exporter.zip - Go to WordPress Admin > Plugins > Add New
- Click "Upload Plugin"
- Select the ZIP file
- Click "Install Now"
- Click "Activate"
- โ Done!
- Extract
markdown-page-exporter.zip - Upload the
markdown-page-exporterfolder to/wp-content/plugins/ - Go to WordPress Admin > Plugins
- Activate "Markdown Page Exporter Simple"
- Open a post on your site
- You'll find the "Copy Markdown" button in the top right
- Click the button โ Markdown copied to clipboard! โ
- Paste wherever you want (Ctrl+V / Cmd+V)
-
Click the arrow (โผ) โ Menu opens with:
- ๐ Copy Markdown (copy to clipboard)
- ๐๏ธ View Markdown (show preview in a window)
-
In the preview window you can:
- Read the formatted Markdown
- Copy it with the "Copy" button
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WordPress Post (HTML) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PHP Plugin (Inserts buttons) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JavaScript (Collects content) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Turndown Library (Converts) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Markdown Output โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-
PHP (Backend):
- Inserts buttons into post content via
the_contentfilter - Passes title and raw content to JavaScript with
wp_localize_script - Uses official WordPress APIs (
get_the_title(),get_the_content())
- Inserts buttons into post content via
-
JavaScript (Frontend):
- Searches for content on page with multiple selectors (universal compatibility)
- Automatic fallback to raw content if DOM not found
- Handles click events on buttons
- Copies to clipboard with
navigator.clipboard(with fallback for old browsers)
-
Turndown (Conversion):
- Standard JavaScript library for HTMLโMarkdown
- Version 7.2.2 (latest stable)
- Loaded from unpkg CDN
- Optimized configuration for WordPress
- WordPress: 5.0 or higher
- PHP: 7.0 or higher
- Browser: Chrome, Firefox, Safari, Edge (recent versions)
- Internet Connection: Required to load Turndown from CDN
- WordPress: 6.0+
- PHP: 8.0+
- HTTPS: For complete clipboard functionality
markdown-page-exporter/
โโโ markdown-page-exporter.php # Main plugin (PHP)
โโโ style.css # Button and UI styles
โโโ script.js # JavaScript logic
โโโ README.md # Documentation (GitHub only)
โโโ README.it.md # Italian documentation
markdown-page-exporter/
โโโ markdown-page-exporter.php # Main plugin file
โโโ style.css # Styles
โโโ script.js # JavaScript
Note: The README files are for GitHub documentation only and are not included in the installable ZIP package.
This plugin does one thing and does it well: convert WordPress posts to Markdown. No control panels, no redundant options, no feature bloat.
The plugin doesn't write anything to the database. It doesn't create tables, doesn't save preferences, leaves no traces. Activate โ it works. Deactivate โ it's gone.
Turndown (the conversion library) is loaded from unpkg.com instead of being included in the plugin.
Why this choice?
- Reduced size: The plugin weighs ~20 KB instead of ~50 KB
- Automatic updates: Bug fixes and improvements to Turndown arrive without updating the plugin
- Global CDN: Turndown is served from fast servers worldwide
- Shared cache: If other sites use Turndown from unpkg, the browser already has it in cache
Considerations:
- Requires internet connection (but if you're reading a WordPress post, you already have one)
- External dependency (but from a reliable CDN used by millions of sites)
If you prefer a self-hosted version, simply modify the link in markdown-page-exporter.php.
The plugin uses multiple fallback techniques to find content in any theme:
- Searches with 8 different CSS selectors in the DOM
- If nothing found, uses raw content from PHP
- Always works, with any theme
- Plugin size: ~20 KB (3 core files)
- External libraries: Turndown (~30 KB from CDN)
- Total loading: ~50 KB
- Performance impact: Minimal (loads only on single posts)
- Database queries: 0 (doesn't use database)
Edit style.css:
/* Main button color */
.md-btn-main {
background: white; /* Background color */
border: 1px solid #ddd; /* Border color */
}
/* Menu hover color */
.md-dropdown-item:hover {
background: #f5f5f5; /* Hover color */
}Edit style.css:
/* Button on left instead of right */
.md-exporter-buttons {
justify-content: flex-start; /* Instead of flex-end */
}Edit script.js (line ~6):
turndown = new TurndownService({
headingStyle: 'atx', // or 'setext'
codeBlockStyle: 'fenced', // or 'indented'
bulletListMarker: '*' // or '-' or '+'
});Edit markdown-page-exporter.php:
wp_enqueue_script(
'turndown-lib',
'https://unpkg.com/turndown@7.2.2/dist/turndown.js', // โ Change here
array(),
'7.2.2',
true
);- Download Turndown from GitHub
- Put
turndown.jsin the plugin folder - Modify the path:
wp_enqueue_script(
'turndown-lib',
plugins_url('turndown.js', __FILE__), // โ Local path
array(),
'7.2.2',
true
);Edit script.js (line ~6):
turndown = new TurndownService({
headingStyle: 'atx', // 'atx' (#) or 'setext' (===)
codeBlockStyle: 'fenced', // 'fenced' (```) or 'indented' ( )
bulletListMarker: '*' // '*', '-', or '+'
});
Click the arrow to access all options
Perfectly usable on smartphones and tablets
Yes. The plugin has been tested with dozens of themes and uses fallback techniques to ensure universal compatibility.
Yes. The plugin converts any HTML to Markdown, regardless of how it was created.
No. Install, activate, it works.
Currently only standard "posts". Support for other content types may come in the future.
No. Zero write queries. Completely stateless.
Yes. Edit style.css as you like. The code is clean and commented.
Turndown is loaded from CDN, so connection is needed. If you want a self-hosted version, download Turndown and modify the path in markdown-page-exporter.php.
Yes. Images are converted to Markdown format . The image file stays on the server, the Markdown contains only the link.
Currently only title and content. Date, author, categories could be added in the future.
Possible causes:
- You're not on a single post (only works on
is_single()) - The post is not of type "post" (doesn't work on pages or custom post types)
- There's a JavaScript conflict (check browser console with F12)
Solution:
- Verify you're on a single post (not homepage, not archives)
- Open browser console (F12) and look for errors in red
- Temporarily deactivate other plugins to find conflicts
Cause: JavaScript doesn't find post content in DOM
Solution: The plugin has an automatic fallback that uses raw content from PHP. If you only see the title:
- Open browser console (F12)
- Look for messages like "Content not found"
- Report the theme you're using so I can add support
Cause: Clipboard API blocked (HTTPS required on some browsers)
Solution:
- Use HTTPS instead of HTTP
- The plugin has an automatic fallback with
document.execCommand - Try with a different browser
Cause: JavaScript conflict with other plugins/themes
Solution:
- Open console (F12) and look for errors
- Temporarily deactivate other plugins
- Reload with Ctrl+F5 to clear cache
โ Twenty Twenty-Four โ Astra โ GeneratePress โ OceanWP โ Neve โ Kadence
โ
Gutenberg (Block Editor)
โ Yoast SEO โ Rank Math โ WooCommerce (doesn't interfere) โ Contact Form 7 โ Jetpack
- Plugin size: ~20 KB
- External libraries: Turndown (~30 KB from CDN)
- Loading: ~50 KB total
- Performance impact: Minimal (loads only on single posts)
- Database queries: 0 (doesn't use database)
- โ No data saved to database
- โ
Uses standard WordPress functions (
wp_enqueue_script,plugins_url) - โ
Validation with
is_single(),get_post_type() - โ Doesn't execute user-provided server-side code
- โ Loads libraries from reliable CDN (unpkg.com)
First stable release! ๐
- โจ Quick Copy: copy with single click
- โจ Modern dropdown menu
- โจ Accurate title with WordPress API
- โจ Conversion with Turndown 7.2.2
- โจ Optimized positioning above content
- โจ Responsive design
- โจ Universal compatibility with WordPress themes
- โจ Automatic fallback for content
- โจ Toast notifications
- โจ Zero configuration
This plugin is distributed under GPL v2 or later license.
This plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the license or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Antonio Troise (Levysoft.it)
Developed with โค๏ธ to simplify exporting WordPress content to Markdown and make WordPress more markdown-friendly.
If the plugin is useful to you:
- โญ Leave a review
- ๐ Report bugs
- ๐ก Suggest new features
- ๐ค Contribute to the code
Contributions, bug reports, and feature requests are welcome!
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Possible features for upcoming versions:
- Custom post types support
- Direct .md file download
- Batch export (export all posts)
- Shortcode for manual positioning
- Admin panel for configuration
- Support for post metadata (date, author, categories)
- Automatic export on save
- Integration with cloud services (Dropbox, Google Drive)
Philosophy: Add features only if truly useful, keeping the plugin lightweight and simple.
- Turndown by Dom Christie: the library that makes conversion possible
- Icons from Feather Icons
- Model Context Protocol: UI inspiration for the copy button design
- WordPress community for feedback and testing
- Turndown Library: https://github.com/mixmark-io/turndown
- WordPress Plugin Handbook: https://developer.wordpress.org/plugins/
- Markdown Guide: https://www.markdownguide.org/
If this plugin is useful to you, leave a โญ on GitHub or a review on WordPress.org!
Thank you for using Markdown Page Exporter! ๐

