How to Export WordPress Content to Markdown
Markdown is a lightweight, future-proof format used by static site generators, documentation platforms, and personal archives because it is easy to read and preserves formatting without the “code bloat” of HTML. This guide walks you through the entire conversion process on Windows 11.
1. System Requirements & Environment Setup
To run the necessary conversion scripts, you must install Node.js.
Installing Node.js on Windows 11
- Download: Visit Nodejs.org and select the LTS (Long Term Support) version for maximum stability.
- Install: Open the installer and click Next through all standard prompts.
- Verify: * Right-click the Start button and select Terminal.
- Type
node -vand hit Enter. If a version number (e.g.,v22.13.1) appears, the installation was successful.
- Type
Fixing the “NPM” Folder Error
If you encounter a “missing directory” error later, you likely need to create a folder that the installer occasionally skips:
- Press
Win + R, type%AppData%\Roaming, and hit Enter. - Check for a folder named npm. If it is missing, right-click and create a new folder named
npm.
2. Exporting Data from WordPress
Choose the method that best fits the complexity of your site’s data.
Native WordPress Export (XML)
- Best for: Standard posts, pages, and categories.
- Process: Navigate to Tools > Export in your dashboard, select All Content, and download the XML file.
- Preparation: Rename the file to
export.xmland place it in a dedicated folder (e.g.,C:\WP_Export\).
WP All Export Pro (CSV & ACF)
- Best for: Sites using Advanced Custom Fields (ACF) or highly structured technical data.
- Process: Create a New Export, select your post type, and drag your specific custom fields into the export columns.
- Format: Export as a CSV. This provides a clean spreadsheet format that can be easily mapped into Markdown headers.
3. The Conversion Process
Transform your export files into clean Markdown documents.
Converting XML with the Wizard
- Open your Terminal inside your export folder.
- Run the command:
npx wordpress-export-to-markdown. - Wizard Recommendations:
- Folder Structure: Select “No” for year/month folders to keep your archive flat and easy to search.
- Custom Post Types: Select Yes to ensure specialized data is captured.
- Images: Select No if you only require a lightweight text archive.
4. The Master Merge
To create a single, searchable document of your entire site, merge the individual Markdown files.
- Open the Terminal in your
outputfolder. - Run the command:
type *.md > Master_Archive.txt.
Quick Command Cheat Sheet Reference:
WordPress to Markdown: Command Cheat Sheet
1. Environment Check
Run these to ensure your PC is ready to handle the scripts.
- Check Node version:
node -v - Check NPM version:
npm -v
2. Conversion Commands
Navigate to your export folder in the Terminal (cd path/to/folder) and run:
- Run XML to Markdown Wizard:
npx wordpress-export-to-markdown - Force a specific input file (if wizard fails):
npx wordpress-export-to-markdown --input export.xml
3. The “Master Merge” (Windows 11)
Run this inside your output folder to combine hundreds of files into one searchable document.
- Merge all Markdown files:
type *.md > Master_Archive.txt - Merge safely (to Desktop) to avoid infinite loops:
type *.md > %USERPROFILE%\Desktop\Master_Archive.txt
4. Cleanup & Maintenance
- Update NPM (Package Manager):
npm install -g npm@latest - Clear Script Cache (if wizard glitches):
npm cache clean --force
Final Pro-Tip for Windows 11 Users
If you ever get the “File not found” error again while running the wizard, remember the Drag and Drop trick:
- Type
npx wordpress-export-to-markdown - When it asks for the path, drag your XML file from your folder directly into the terminal window. It will paste the perfect path for you automatically.

