Guide
Command line reference
Every flag wpexportjson export accepts, what it defaults to, and the configuration-file form of the same settings — plus the checkpoint that makes an interrupted export resumable instead of a restart.
Usage
Basic Export
1wpexportjson export --url https://your-wordpress-site.com
Advanced Options
1wpexportjson export \
2 --url https://your-wordpress-site.com \
3 --format markdown \
4 --output ./my-export \
5 --brute-force \
6 --max-id 10000 \
7 --download-media \
8 --concurrent 10
Configuration File
Create a config.yaml file:
1url: "https://your-wordpress-site.com"
2output: "./export"
3format: "json"
4brute_force: true
5max_id: 10000
6download_media: true
7concurrent: 10
Then run:
1wpexportjson export --config config.yaml
Command line options
| Option | Description | Default |
|---|---|---|
--url | WordPress site URL | Required |
--output | Output directory or file | ./export |
--format | Export format (json/ markdown/ ssg/ 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 |
--scan-range | Rescan a specific inclusive ID range for posts/pages/media, e.g. 100-200 | "" |
--max-media-mb | Per-file media download size cap in MB (0 = built-in default of 2048) | 0 |
--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) | - |
--media-path-style | Form of rewritten media paths: root (/media/…, resolves at any URL depth) or relative (media/…) | root |
--link-style | Form of link/canonical_url/hreflangs: absolute (source URL) or root (root-relative path) | absolute( root for ssg) |
--extract-meta | Which meta tags to keep beyond the named SEO fields: all, none, or a comma-separated allow-list | all |
--report-a11y | Write a11y-report.md flagging WCAG 2.2 contrast and missing alt-text issues | false |
--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-custom-types | Skip the custom post types a theme or plugin registered | false |
--custom-types | Export only these custom types (comma-separated slugs, e.g. cpt_services,cpt_portfolio) | - |
--no-users | Skip exporting users | false |
--no-tags | Skip exporting tags | false |
--no-menus | Skip exporting navigation menus (they need authentication — see the navigation menus guide) | false |
--no-comments | Skip exporting reader comments | 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 |
--ssg-sections | Markdown: emit ## Excerpt/## Content sections and omit the duplicate body H1 (for ssg) | 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 |
--retries | Attempts for a request the site answers with 5xx or 429, or drops. Exponential backoff with jitter, honouring Retry-After | 3 |
--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 | - |
Resume / checkpoint
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:
1# First export attempt (interrupted at 90%)
2wpexportjson export --url https://large-site.com --resume -f markdown
3# Error: connection timeout...
4
5# Resume from checkpoint
6wpexportjson export --url https://large-site.com --resume -f markdown
7# Resuming from checkpoint: export/large-site.com.2026-02-02/.wpexport_checkpoint.json
8# Checkpoint: posts=1500 (done=true), pages=42 (done=false)...
The checkpoint file (.wpexport_checkpoint.json) is automatically deleted on successful completion.