Repository: github.com/tradik/wpexporter
A comprehensive WordPress content export toolkit with three powerful applications:
Export to 14+ popular platforms including e-commerce systems (Shopify, Magento, PrestaShop), traditional CMS platforms (WordPress, Drupal, Wix, Squarespace, Webflow, Weebly), and headless CMS solutions (Ghost, Strapi, Contentful), plus JSON and Markdown formats with full media download support.
--no-posts, --no-pages, and --no-products flagsgit clone https://github.com/tradik/wpexporter.git
cd wpexporter
make build
# Optional: Install man pages (requires sudo)
sudo make install-man
man wpexportjson
go install github.com/tradik/wpexporter/cmd/wpexporter@latest
Docker images are available from GitHub Container Registry:
# Pull the latest image
docker pull ghcr.io/tradik/wpexporter:latest
# Run wpexporter
docker run --rm -v $(pwd)/export:/export ghcr.io/tradik/wpexporter:latest \
wpexportjson export --url https://example.com --output /export
# Run wpxmlrpc
docker run --rm -v $(pwd)/export:/export ghcr.io/tradik/wpexporter:latest \
wpxmlrpc export --url https://example.com --username admin --password mypassword --output /export
# Export all content from a WordPress site
wpexportjson export --url https://example.com --output ./export
# Export with brute force discovery
wpexportjson export --url https://example.com --brute-force --output ./export
# Export to specific format
wpexportjson export --url https://example.com --format json --output ./export.json
# Export and create ZIP archive
wpexportjson export --url https://example.com --zip
# Export to ZIP only (remove files after creating ZIP)
wpexportjson export --url https://example.com --zip --no-files
# Export to Markdown with ZIP archive
wpexportjson export --url https://example.com -f markdown --zip
# Export to Shopify-compatible CSV format
wpexportjson export --url https://example.com -f shopify
# Export to Shopify CSV with ZIP archive
wpexportjson export --url https://example.com -f shopify --zip
# Export to Magento-compatible CSV format
wpexportjson export --url https://example.com -f magento
# Export to Magento CSV with ZIP archive
wpexportjson export --url https://example.com -f magento --zip
# Export to WordPress WXR format (for WordPress import)
wpexportjson export --url https://example.com -f wordpress
# Export to Drupal-compatible JSON format
wpexportjson export --url https://example.com -f drupal
# Export to Wix-compatible JSON format
wpexportjson export --url https://example.com -f wix
# Export to Squarespace-compatible XML format
wpexportjson export --url https://example.com -f squarespace
# Export to Webflow-compatible CSV format
wpexportjson export --url https://example.com -f webflow
# Export to Weebly-compatible format (XML + JSON)
wpexportjson export --url https://example.com -f weebly
# Export to PrestaShop-compatible CSV format
wpexportjson export --url https://example.com -f prestashop
# Export to Ghost-compatible JSON format
wpexportjson export --url https://example.com -f ghost
# Export to Strapi-compatible JSON format
wpexportjson export --url https://example.com -f strapi
# Export to Contentful-compatible JSON format
wpexportjson export --url https://example.com -f contentful
# Export with authentication
wpxmlrpc export --url https://example.com --username admin --password mypassword --output ./xmlrpc-export
# Export to markdown format
wpxmlrpc export --url https://example.com --username admin --password mypassword --format markdown --output ./markdown-export
The MCP server enables AI assistants like Claude to interact with WordPress sites.
Claude Desktop Configuration (claude_desktop_config.json):
{
"mcpServers": {
"wpexporter": {
"command": "wpmcp",
"args": ["serve"]
}
}
}
Claude Code Configuration (.claude/mcp.json):
{
"mcpServers": {
"wpexporter": {
"type": "stdio",
"command": "wpmcp",
"args": ["serve"]
}
}
}
Available MCP Tools:
| Tool | Description |
|ββ|ββββ-|
| list_formats | List all 14 available export formats |
| get_site_info | Get WordPress site information |
| list_posts | List posts with optional path filtering |
| list_pages | List pages from a site |
| export_site | Full site export to any format |
| get_post | Get a specific post by ID |
| list_categories | List all categories |
| list_media | List media files |
wpexportjson export --url https://your-wordpress-site.com
wpexportjson export \
--url https://your-wordpress-site.com \
--format markdown \
--output ./my-export \
--brute-force \
--max-id 10000 \
--download-media \
--concurrent 10
Create a config.yaml file:
url: "https://your-wordpress-site.com"
output: "./export"
format: "json"
brute_force: true
max_id: 10000
download_media: true
concurrent: 10
Then run:
wpexportjson export --config config.yaml
| Option | Description | Default |
|---|---|---|
--url | WordPress site URL | Required |
--output | Output directory or file | ./export |
--format | Export format (json/ markdown/ shopify/ magento/ wordpress/ drupal/ wix/ squarespace/ webflow/ weebly/ prestashop/ ghost/ strapi/ contentful) | json |
--brute-force | Enable brute force ID discovery | false |
--max-id | Maximum ID for brute force | 10000 |
--download-media | Download images and videos | true |
--no-media | Disable media downloads (alias for --download-media=false) | false |
--relevant-media-only | Download only featured images and media linked in content (images, PDFs, videos, etc.) | false |
--exclude-media-types | Media types to skip (comma-separated: images,videos,audio,documents,archives,pdf,gif) | - |
--concurrent | Concurrent downloads | 5 |
--zip | Create ZIP archive of export | false |
--no-files | Remove export files after creating ZIP (requires --zip) | false |
--no-posts | Skip exporting blog posts | false |
--no-pages | Skip exporting pages | false |
--no-products | Skip exporting WooCommerce products | false |
--no-users | Skip exporting users | false |
--no-tags | Skip exporting tags | false |
--path-filter | Filter posts/pages by URL path pattern (e.g., /fr/arts/) | - |
--flat-html | Convert HTML to Markdown (Bricks Builder, Elementor support) | false |
--basic-html | Clean HTML to basic elements (tables, lists, links - for Shopify) | false |
--preserve-classes | CSS classes to preserve from HTML processing (comma-separated, supports wildcards like klaviyo-form-*) | - |
--preserve-ids | Element IDs to preserve from HTML processing (comma-separated, supports wildcards) | - |
--assisted-crawl | Crawl URLs to extract SEO metadata (title, description, og tags) | false |
--exclude-tags | SEO tags to exclude (comma-separated: title,meta:description,og:title,canonical,lang,hreflangs) | - |
--crawl-content | Crawl pages with empty content (Bricks, Elementor page builders) | false |
--skip-empty-content | Skip posts/pages with empty content from export | false |
--auth-user | Username for Basic Auth (prompts for password if --auth-pass not provided) | - |
--auth-pass | Password for Basic Auth | - |
--auth-token | Bearer token for authentication | - |
--rate-limit | Delay between API requests in milliseconds (prevents server rate limiting) | 0 |
--resume | Resume from checkpoint if previous export was interrupted | false |
--timeout | HTTP request timeout in seconds (increase for slow servers) | 30 |
--verbose, -v | Enable verbose output | false |
--quiet, -q | Suppress all output, only return exit code | false |
--config | Configuration file path | - |
The --assisted-crawl option enables extraction of SEO metadata by crawling actual page URLs. This is useful when:
<title> tags and meta descriptions| Field | Source |
|---|---|
seo_title |
<title> tag content |
meta_description |
<meta name="description"> |
meta_keywords |
<meta name="keywords"> |
og_title |
<meta property="og:title"> |
og_description |
<meta property="og:description"> |
og_image |
<meta property="og:image"> |
canonical_url |
<link rel="canonical"> |
lang |
<html lang="..."> or <meta http-equiv="Content-Language"> |
hreflangs |
<link rel="alternate" hreflang="..."> (all language variants) |
# Export with SEO metadata extraction
wpexportjson export --url https://example.com --assisted-crawl -f markdown
# Combine with path filter for specific sections
wpexportjson export --url https://example.com --path-filter=/blog/ --assisted-crawl -f markdown
# With authentication for protected sites
wpexportjson export --url https://example.com --auth-user admin --auth-pass secret --assisted-crawl
# Exclude specific SEO tags from extraction
wpexportjson export --url https://example.com --assisted-crawl --exclude-tags 'meta:description,og:title'
# With rate limiting to prevent server overload (500ms delay between requests)
wpexportjson export --url https://example.com --rate-limit 500 -f markdown
# Resume interrupted export (checkpoint is saved automatically)
wpexportjson export --url https://example.com --resume -f markdown
When exporting large sites, the --resume flag enables automatic checkpoint saving. If the export is interrupted (network error, server timeout, etc.), you can resume from where it left off:
# First export attempt (interrupted at 90%)
wpexportjson export --url https://large-site.com --resume -f markdown
# Error: connection timeout...
# Resume from checkpoint
wpexportjson export --url https://large-site.com --resume -f markdown
# Resuming from checkpoint: export/large-site.com.2026-02-02/.wpexport_checkpoint.json
# Checkpoint: posts=1500 (done=true), pages=42 (done=false)...
The checkpoint file (.wpexport_checkpoint.json) is automatically deleted on successful completion.
The --flat-html option converts HTML content to clean Markdown format. This is useful for:
| HTML Element | Markdown Output |
|---|---|
<h1> - <h6> |
# - ###### |
<p> |
Plain text with line breaks |
<strong>, <b> |
**bold** |
<em>, <i> |
*italic* |
<a href="..."> |
[text](url) |
<img src="..." alt="..."> |
 |
<ul>, <ol> |
- or 1. lists |
<blockquote> |
> quote |
<code> |
`inline` |
<pre><code> |
` ``` ` code block |
<hr> |
--- |
Bricks: .brxe-heading |
## heading |
Bricks: .brxe-text |
paragraph |
You can define custom rules in your config.yaml for site-specific HTML classes:
flat_html_rules:
# Bricks Builder custom headings
- class: "brxe-heading"
tag: "div"
markdown: "## {content}\n\n"
# Elementor headings
- class: "elementor-heading-title"
markdown: "# {content}\n\n"
# Custom paragraph class
- class: "my-paragraph"
markdown: "{content}\n\n"
# Specific tag + class combination
- class: "custom-quote"
tag: "span"
markdown: "> {content}\n\n"
Rule fields:
class (required): CSS class to matchtag (optional): HTML tag to match (e.g., βdivβ, βspanβ)markdown: Output template where {content} is replaced with the elementβs textUse --preserve-classes and --preserve-ids to keep certain elements intact during HTML processing with --flat-html or --basic-html. This is useful for:
# Preserve Klaviyo forms (with wildcard)
wpexportjson export --url https://example.com --basic-html \
--preserve-classes "klaviyo-form-*"
# Preserve specific elements by ID
wpexportjson export --url https://example.com --flat-html \
--preserve-ids "newsletter-form,sidebar-widget"
# Combine classes and IDs (comma-separated)
wpexportjson export --url https://example.com --basic-html \
--preserve-classes "klaviyo-form-*,mailchimp-widget" \
--preserve-ids "contact-form"
Wildcard support:
klaviyo-form-* matches klaviyo-form-XL7uTf, klaviyo-form-ABC123, etc.brxe-*-section matches brxe-hero-section, brxe-footer-section, etc.Configuration file:
preserve_classes:
- "klaviyo-form-*"
- "mailchimp-widget"
preserve_ids:
- "newsletter-form"
Below are complete configuration examples for popular WordPress page builders.
# config-bricks.yaml
flat_html_rules:
# Headings
- class: "brxe-heading"
tag: "div"
markdown: "## {content}\n\n"
- class: "brxe-heading"
tag: "h1"
markdown: "# {content}\n\n"
- class: "brxe-heading"
tag: "h2"
markdown: "## {content}\n\n"
- class: "brxe-heading"
tag: "h3"
markdown: "### {content}\n\n"
# Text blocks
- class: "brxe-text"
markdown: "{content}\n\n"
- class: "brxe-text-basic"
markdown: "{content}\n\n"
# Lists
- class: "brxe-list"
markdown: "{content}\n\n"
# Buttons (extract as links)
- class: "brxe-button"
markdown: "[{content}]\n\n"
# Code blocks
- class: "brxe-code"
markdown: "```\n{content}\n```\n\n"
# config-elementor.yaml
flat_html_rules:
# Headings
- class: "elementor-heading-title"
markdown: "## {content}\n\n"
- class: "elementor-size-large"
markdown: "# {content}\n\n"
- class: "elementor-size-medium"
markdown: "## {content}\n\n"
- class: "elementor-size-small"
markdown: "### {content}\n\n"
# Text widgets
- class: "elementor-text-editor"
markdown: "{content}\n\n"
- class: "elementor-widget-text-editor"
markdown: "{content}\n\n"
# Buttons
- class: "elementor-button-text"
markdown: "[{content}]\n\n"
# Lists
- class: "elementor-icon-list-text"
markdown: "- {content}\n"
# Testimonials
- class: "elementor-testimonial-content"
markdown: "> {content}\n\n"
- class: "elementor-testimonial-name"
markdown: "**{content}**\n\n"
# Tabs and accordions
- class: "elementor-tab-title"
markdown: "### {content}\n\n"
- class: "elementor-tab-content"
markdown: "{content}\n\n"
- class: "elementor-accordion-title"
markdown: "### {content}\n\n"
- class: "elementor-accordion-content"
markdown: "{content}\n\n"
# config-divi.yaml
flat_html_rules:
# Module titles
- class: "et_pb_module_header"
markdown: "## {content}\n\n"
# Text modules
- class: "et_pb_text_inner"
markdown: "{content}\n\n"
# Blurb modules
- class: "et_pb_blurb_content"
markdown: "{content}\n\n"
- class: "et_pb_blurb_title"
markdown: "### {content}\n\n"
# Buttons
- class: "et_pb_button"
markdown: "[{content}]\n\n"
# Testimonials
- class: "et_pb_testimonial_description"
markdown: "> {content}\n\n"
- class: "et_pb_testimonial_author"
markdown: "**{content}**\n\n"
# Tabs
- class: "et_pb_tab_title"
markdown: "### {content}\n\n"
- class: "et_pb_tab_content"
markdown: "{content}\n\n"
# Toggle/Accordion
- class: "et_pb_toggle_title"
markdown: "### {content}\n\n"
- class: "et_pb_toggle_content"
markdown: "{content}\n\n"
# Pricing tables
- class: "et_pb_pricing_title"
markdown: "### {content}\n\n"
- class: "et_pb_pricing_content"
markdown: "{content}\n\n"
# config-oxygen.yaml
flat_html_rules:
# Headings
- class: "ct-headline"
markdown: "## {content}\n\n"
- class: "ct-headline"
tag: "h1"
markdown: "# {content}\n\n"
- class: "ct-headline"
tag: "h2"
markdown: "## {content}\n\n"
- class: "ct-headline"
tag: "h3"
markdown: "### {content}\n\n"
# Text blocks
- class: "ct-text-block"
markdown: "{content}\n\n"
# Rich text
- class: "ct-rich-text"
markdown: "{content}\n\n"
# Buttons
- class: "ct-button"
markdown: "[{content}]\n\n"
# Links
- class: "ct-link-text"
markdown: "{content}\n\n"
# config-generateblocks.yaml
flat_html_rules:
# Headlines
- class: "gb-headline"
markdown: "## {content}\n\n"
- class: "gb-headline"
tag: "h1"
markdown: "# {content}\n\n"
- class: "gb-headline"
tag: "h2"
markdown: "## {content}\n\n"
- class: "gb-headline"
tag: "h3"
markdown: "### {content}\n\n"
# Buttons
- class: "gb-button"
markdown: "[{content}]\n\n"
- class: "gb-button-text"
markdown: "{content}"
If your site uses multiple page builders or plugins, you can combine rules:
# config-combined.yaml
flat_html_rules:
# Bricks Builder
- class: "brxe-heading"
markdown: "## {content}\n\n"
- class: "brxe-text"
markdown: "{content}\n\n"
# Elementor
- class: "elementor-heading-title"
markdown: "## {content}\n\n"
- class: "elementor-text-editor"
markdown: "{content}\n\n"
# WPBakery/Visual Composer
- class: "vc_custom_heading"
markdown: "## {content}\n\n"
- class: "wpb_text_column"
markdown: "{content}\n\n"
# Gutenberg blocks
- class: "wp-block-heading"
markdown: "## {content}\n\n"
- class: "wp-block-paragraph"
markdown: "{content}\n\n"
- class: "wp-block-quote"
markdown: "> {content}\n\n"
# Convert HTML to Markdown with default rules
wpexportjson export --url https://example.com --flat-html -f markdown
# With custom rules from config file
wpexportjson export --url https://example.com --flat-html --config config.yaml -f markdown
# Combine with content crawling for page builder sites
wpexportjson export --url https://example.com --crawl-content --flat-html -f markdown
When using --assisted-crawl with markdown format, SEO fields are included in the frontmatter:
---
id: 123
title: "Original Post Title"
seo_title: "SEO Optimized Title | Site Name"
meta_description: "A compelling description for search engines..."
og_title: "Title for Social Sharing"
og_image: "https://example.com/social-image.jpg"
lang: "en-US"
hreflangs:
- lang: "en-US"
href: "https://example.com/post/"
- lang: "de-DE"
href: "https://example.com/de/post/"
- lang: "fr-FR"
href: "https://example.com/fr/post/"
excerpt: "A brief summary of the post content..."
# ... other fields
---
# Post Title
The full post content follows directly after the frontmatter...
WordPress Gutenberg editor stores content as HTML with special comment markers. Hereβs how wpexporter handles Gutenberg blocks:
Gutenberg blocks export automatically in all formats:
| Content Type | Export Result |
|---|---|
| Standard blocks (paragraphs, headings, lists) | β Exported as HTML content |
| Core blocks (quote, code, image, gallery) | β Embedded HTML preserved |
| Custom blocks (plugins, themes) | β Rendered HTML output |
| Block patterns & reusable blocks | β Resolved to final HTML |
No configuration needed for JSON, WordPress WXR, or HTML-preserving formats.
--flat-htmlWhen exporting to Markdown format, use --flat-html to convert Gutenberg HTML to clean Markdown:
# Convert Gutenberg content to Markdown
wpexportjson export --url https://example.com --flat-html -f markdown
Common Gutenberg CSS classes for custom rules in config.yaml:
flat_html_rules:
# Core Gutenberg blocks
- class: "wp-block-heading"
markdown: "## {content}\n\n"
- class: "wp-block-paragraph"
markdown: "{content}\n\n"
- class: "wp-block-quote"
markdown: "> {content}\n\n"
- class: "wp-block-code"
markdown: "```\n{content}\n```\n\n"
- class: "wp-block-preformatted"
markdown: "```\n{content}\n```\n\n"
- class: "wp-block-list"
markdown: "{content}\n\n"
- class: "wp-block-image"
markdown: "{content}\n\n"
# Extended blocks
- class: "wp-block-pullquote"
markdown: "> **{content}**\n\n"
- class: "wp-block-verse"
markdown: "*{content}*\n\n"
- class: "wp-block-table"
markdown: "{content}\n\n"
The exporter preserves Gutenberg comment markers in HTML exports:
<!-- wp:paragraph -->
<p>Content here...</p>
<!-- /wp:paragraph -->
These markers are stripped during Markdown conversion with --flat-html.
When downloading media with --download-media, the exporter rewrites URLs in exported content to point to local files.
Downloaded media files are stored in a structured format:
export/
βββ posts/
β βββ my-post.md
βββ pages/
β βββ about.md
βββ media/
βββ 123_featured-image.jpg
βββ 124_inline-photo.png
βββ 125_document.pdf
βββ 126_video.mp4
Naming pattern: {media_id}_{original_filename}{extension}
Absolute WordPress URLs are converted to relative local paths:
| Original URL | Rewritten Path |
|---|---|
https://example.com/wp-content/uploads/2025/01/photo.jpg |
media/123_photo.jpg |
https://example.com/wp-content/uploads/2025/01/photo-300x200.jpg |
media/123_photo.jpg |
https://example.com/wp-content/uploads/2025/01/photo-150x150.jpg |
media/123_photo.jpg |
WordPress generates multiple image sizes (thumbnail, medium, large, full). The exporter:
-{width}x{height} suffixed URLs automatically--relevant-media-onlyFor sites with large media libraries, use --relevant-media-only to download only used media:
wpexportjson export --url https://example.com --relevant-media-only -f markdown
What gets downloaded:
| Media Type | Downloaded | Condition |
|---|---|---|
| Featured images | β Yes | Referenced by featured_media field |
| Content images | β Yes | Found in <img> tags within content |
| Excerpt images | β Yes | Found in <img> tags within excerpt |
| Linked PDFs/documents | β Yes | Found in <a href> tags (pdf, docx, xlsx, etc.) |
| Linked videos | β Yes | Found in <a href> tags (mp4, webm, avi, etc.) |
| Linked archives | β Yes | Found in <a href> tags (zip, rar, 7z, etc.) |
| Unused library items | β No | Not referenced by any post/page |
Benefits:
# Download all media (default)
wpexportjson export --url https://example.com -f markdown
# Download only featured images and content images
wpexportjson export --url https://example.com --relevant-media-only -f markdown
# Skip media download entirely
wpexportjson export --url https://example.com --no-media -f markdown
# Combine with path filter for targeted export
wpexportjson export --url https://example.com --path-filter=/blog/ --relevant-media-only -f markdown
# Clone the repository
git clone https://github.com/tradik/wpexporter.git
cd wpexporter
# Install dependencies
make deps
# Install development tools
make dev-install
# Run in development mode
make dev
# Build for current platform
make build
# Build release binaries for all platforms
make release
# Run tests
make test
# Run linter
make lint
# Format code
make format
wpexporter/
βββ cmd/
β βββ wpexporter/ # CLI application entry point
βββ internal/
β βββ api/ # WordPress API client
β βββ export/ # Export functionality
β βββ media/ # Media download handling
β βββ config/ # Configuration management
βββ pkg/
β βββ models/ # Data models
βββ Makefile # Build automation
βββ go.mod # Go module definition
βββ README.md # This file
graph TB
A[CLI Interface] --> B[Configuration Manager]
B --> C[WordPress API Client]
C --> D[Content Discovery]
D --> E[Brute Force Scanner]
D --> F[Media Downloader]
E --> G[Export Engine]
F --> G
G --> H[JSON Exporter]
G --> I[Markdown Exporter]
G --> K[Shopify Exporter]
G --> L[Magento Exporter]
G --> M[Wix/Squarespace/Webflow]
G --> N[Ghost/Strapi/Contentful]
G --> O[Weebly/PrestaShop]
H --> J[Output Files]
I --> J
K --> J
L --> J
M --> J
N --> J
O --> J
The Shopify export format generates CSV files compatible with Shopifyβs product import system. This allows you to migrate WordPress content (posts, pages) to Shopify as products.
When exporting to Shopify format, the following files are generated:
| File | Description |
|---|---|
shopify_posts.csv |
WordPress posts exported as Shopify products |
shopify_pages.csv |
WordPress pages exported as Shopify products |
shopify_products.csv |
Combined posts and pages as products |
shopify_metadata.csv |
Site metadata and export statistics |
WordPress content is mapped to Shopify product fields as follows:
| WordPress Field | Shopify Field |
|---|---|
| Post Slug | Handle |
| Post Title | Title |
| Post Content (HTML) | Body (HTML) |
| Author Name | Vendor |
| First Category | Type |
| Tags | Tags (comma-separated) |
| Post Status | Published (TRUE/FALSE) |
| Featured Image | Image Src |
| Post Excerpt | SEO Description |
| Post ID | Variant SKU (format: WP-{id}) |
Note: The Body (HTML) field includes a styled metadata header with post details (ID, slug, dates, status, author, categories, tags, and hreflang links when available via --assisted-crawl).
# Export WordPress content to Shopify format
wpexportjson export --url https://your-wordpress-site.com -f shopify
# Export to Shopify and create ZIP for easy upload
wpexportjson export --url https://your-wordpress-site.com -f shopify --zip
shopify_products.csvNote: The exported CSV follows Shopifyβs official product CSV format. For best results, review the Shopify CSV import documentation.
The Magento export format generates CSV files compatible with Magento 2βs product import system. This allows you to migrate WordPress content (posts, pages) to Magento as simple products.
When exporting to Magento format, the following files are generated:
| File | Description |
|---|---|
magento_posts.csv |
WordPress posts exported as Magento products |
magento_pages.csv |
WordPress pages exported as Magento products |
magento_products.csv |
Combined posts and pages as products |
magento_metadata.csv |
Site metadata and export statistics |
WordPress content is mapped to Magento product fields as follows:
| WordPress Field | Magento Field |
|---|---|
| Post Slug (uppercase) | sku |
| Post Title | name |
| Post Content (HTML) | description |
| Post Excerpt | short_description |
| Categories | categories (Default Category/Name format) |
| Tags | meta_keywords |
| Post Slug | url_key |
| Post Title | meta_title |
| Post Excerpt | meta_description |
| Featured Image | base_image, small_image, thumbnail_image |
| Post Status | product_online (1=enabled, 0=disabled) |
# Export WordPress content to Magento format
wpexportjson export --url https://your-wordpress-site.com -f magento
# Export to Magento and create ZIP for easy upload
wpexportjson export --url https://your-wordpress-site.com -f magento --zip
magento_products.csvNote: Before importing, ensure image files are uploaded to
/pub/media/import/on your Magento server. For best results, review the Magento 2 CSV import documentation.
The WordPress export format generates a WXR (WordPress eXtended RSS) XML file that can be imported into another WordPress installation. This is the standard format used by WordPress for content migration.
When exporting to WordPress format, the following file is generated:
| File | Description |
|---|---|
wordpress_export.xml |
Complete WXR export with all content |
| WordPress Source | WXR Element |
|---|---|
| Posts | <item> with <wp:post_type>post</wp:post_type> |
| Pages | <item> with <wp:post_type>page</wp:post_type> |
| Media/Attachments | <item> with <wp:post_type>attachment</wp:post_type> |
| Categories | <wp:category> |
| Tags | <wp:tag> |
| Authors | <wp:author> |
| Featured Images | <wp:postmeta> with _thumbnail_id |
| SEO Data | <wp:postmeta> with Yoast-compatible keys |
# Export WordPress content to WXR format
wpexportjson export --url https://your-wordpress-site.com -f wordpress
# Export to WordPress WXR and create ZIP for easy transfer
wpexportjson export --url https://your-wordpress-site.com -f wordpress --zip
wordpress_export.xmlNote: WXR is the official WordPress import/export format. For best results, review the WordPress Import documentation.
The Drupal export format generates JSON files compatible with Drupalβs Migrate module. This format is designed for migrating WordPress content to Drupal 8/9/10.
When exporting to Drupal format, the following files are generated:
| File | Description |
|---|---|
drupal_export.json |
Complete export with all content types |
drupal_nodes.json |
Posts and pages as Drupal nodes |
drupal_terms.json |
Categories and tags as taxonomy terms |
drupal_users.json |
Users as Drupal user accounts |
drupal_media.json |
Media files as Drupal media entities |
| WordPress Source | Drupal Destination |
|---|---|
| Posts | Node type: article |
| Pages | Node type: page |
| Categories | Taxonomy vocabulary: categories |
| Tags | Taxonomy vocabulary: tags |
| Featured Image | Media entity reference (field_image) |
| Post Content | Body field with full_html format |
| Post Excerpt | Body summary field |
| SEO Data | Metatag module fields |
# Export WordPress content to Drupal format
wpexportjson export --url https://your-wordpress-site.com -f drupal
# Export to Drupal and create ZIP for easy transfer
wpexportjson export --url https://your-wordpress-site.com -f drupal --zip
drush migrate:import --allNote: Drupal migration requires custom migration YAML configuration. The JSON structure is designed to work with
migrate_source_jsonplugin. For best results, review the Drupal Migrate documentation.
The Wix export format generates a JSON file containing posts, pages, categories, tags, and media that can be imported to Wix.
| File | Description |
|---|---|
wix_export.json |
Complete export with all content |
| WordPress Source | Wix Destination |
|---|---|
| Posts | Blog posts |
| Pages | Static pages |
| Categories | Blog categories |
| Tags | Blog tags |
| Featured Image | Cover image |
| SEO Data | SEO fields |
wpexportjson export --url https://your-wordpress-site.com -f wix
The Squarespace export format generates a WXR-compatible XML file that can be imported directly into Squarespace.
| File | Description |
|---|---|
squarespace_export.xml |
Complete WXR export for Squarespace import |
| WordPress Source | Squarespace Destination |
|---|---|
| Posts | Blog posts |
| Pages | Pages |
| Categories | Categories |
| Tags | Tags |
| Media | Media library items |
wpexportjson export --url https://your-wordpress-site.com -f squarespace
squarespace_export.xmlThe Webflow export format generates CSV files compatible with Webflow CMS import.
| File | Description |
|---|---|
webflow_posts.csv |
Blog posts as CMS items |
webflow_pages.csv |
Static pages |
webflow_categories.csv |
Categories |
webflow_authors.csv |
Authors |
webflow_export.json |
Complete JSON backup |
| WordPress Source | Webflow Destination |
|---|---|
| Post Title | Name |
| Post Slug | Slug |
| Post Content | Post Body |
| Post Date | Published On |
| Author | Author reference |
| Categories | Categories (multi-reference) |
| Tags | Tags |
| SEO Data | SEO fields |
wpexportjson export --url https://your-wordpress-site.com -f webflow
The Weebly export format generates both XML and JSON files for maximum compatibility.
| File | Description |
|---|---|
weebly_export.xml |
WXR-compatible XML export |
weebly_export.json |
JSON export with posts and pages |
wpexportjson export --url https://your-wordpress-site.com -f weebly
The PrestaShop export format generates semicolon-delimited CSV files compatible with PrestaShopβs import system. Posts and pages are converted to products.
| File | Description |
|---|---|
prestashop_products.csv |
Products (from posts/pages) |
prestashop_posts.csv |
Blog posts |
prestashop_pages.csv |
CMS pages |
prestashop_categories.csv |
Product categories |
prestashop_metadata.csv |
Export metadata |
prestashop_export.json |
Complete JSON backup |
| WordPress Source | PrestaShop Destination |
|---|---|
| Post Title | Product name |
| Post Content | Product description |
| Post Excerpt | Short description |
| Categories | Product categories |
| Tags | Tags |
| Featured Image | Product image |
| Post ID | Reference (WP-{id}) |
wpexportjson export --url https://your-wordpress-site.com -f prestashop
The Ghost export format generates a JSON file compatible with Ghost CMS import.
| File | Description |
|---|---|
ghost_export.json |
Complete Ghost import format |
| WordPress Source | Ghost Destination |
|---|---|
| Posts | Posts |
| Pages | Pages |
| Categories | Tags (with category prefix) |
| Tags | Tags |
| Users | Users |
| Featured Image | Feature image |
| SEO Data | Meta fields |
wpexportjson export --url https://your-wordpress-site.com -f ghost
ghost_export.jsonThe Strapi export format generates JSON files compatible with Strapi v4 headless CMS.
| File | Description |
|---|---|
strapi_export.json |
Complete export with all content types |
strapi_articles.json |
Blog articles |
strapi_pages.json |
Pages |
strapi_categories.json |
Categories |
strapi_tags.json |
Tags |
strapi_authors.json |
Authors |
strapi_media.json |
Media files |
| WordPress Source | Strapi Destination |
|---|---|
| Posts | Articles (collection type) |
| Pages | Pages (collection type) |
| Categories | Categories (collection type) |
| Tags | Tags (collection type) |
| Users | Authors (collection type) |
| Media | Media library |
| SEO Data | SEO component fields |
wpexportjson export --url https://your-wordpress-site.com -f strapi
The Contentful export format generates a JSON file compatible with Contentfulβs import tool.
| File | Description |
|---|---|
contentful_export.json |
Complete Contentful import format |
| WordPress Source | Contentful Destination |
|---|---|
| Posts | blogPost content type |
| Pages | page content type |
| Categories | category content type |
| Tags | tag content type |
| Users | author content type |
| Media | Assets |
The export includes content type definitions for:
blogPost - Blog posts with title, slug, content, author, categories, tagspage - Static pages with title, slug, contentcategory - Categories with name, slug, descriptiontag - Tags with name, slugauthor - Authors with name, slug, biowpexportjson export --url https://your-wordpress-site.com -f contentful
npm install -g contentful-clicontentful logincontentful space import --content-file contentful_export.jsongit checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is dual-licensed under the MIT License and BSD 3-Clause License. See the LICENSE file for full license texts and choose the one that best fits your use case.
See CHANGELOG.md for a list of changes and version history.