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
--urlWordPress site URLRequired
--outputOutput directory or file./export
--formatExport format (json/ markdown/ ssg/ shopify/ magento/ wordpress/ drupal/ wix/ squarespace/ webflow/ weebly/ prestashop/ ghost/ strapi/ contentful)json
--brute-forceEnable brute force ID discoveryfalse
--max-idMaximum ID for brute force10000
--scan-rangeRescan a specific inclusive ID range for posts/pages/media, e.g. 100-200""
--max-media-mbPer-file media download size cap in MB (0 = built-in default of 2048)0
--download-mediaDownload images and videostrue
--no-mediaDisable media downloads (alias for --download-media=false)false
--relevant-media-onlyDownload only featured images and media linked in content (images, PDFs, videos, etc.)false
--exclude-media-typesMedia types to skip (comma-separated: images,videos,audio,documents,archives,pdf,gif)-
--media-path-styleForm of rewritten media paths: root (/media/…, resolves at any URL depth) or relative (media/…)root
--link-styleForm of link/canonical_url/hreflangs: absolute (source URL) or root (root-relative path)absolute
(root for ssg)
--extract-metaWhich meta tags to keep beyond the named SEO fields: all, none, or a comma-separated allow-listall
--report-a11yWrite a11y-report.md flagging WCAG 2.2 contrast and missing alt-text issuesfalse
--concurrentConcurrent downloads5
--zipCreate ZIP archive of exportfalse
--no-filesRemove export files after creating ZIP (requires --zip)false
--no-postsSkip exporting blog postsfalse
--no-pagesSkip exporting pagesfalse
--no-productsSkip exporting WooCommerce productsfalse
--no-custom-typesSkip the custom post types a theme or plugin registeredfalse
--custom-typesExport only these custom types (comma-separated slugs, e.g. cpt_services,cpt_portfolio)-
--no-usersSkip exporting usersfalse
--no-tagsSkip exporting tagsfalse
--no-menusSkip exporting navigation menus (they need authentication — see the navigation menus guide)false
--no-commentsSkip exporting reader commentsfalse
--path-filterFilter posts/pages by URL path pattern (e.g., /fr/arts/)-
--flat-htmlConvert HTML to Markdown (Bricks Builder, Elementor support)false
--basic-htmlClean HTML to basic elements (tables, lists, links - for Shopify)false
--ssg-sectionsMarkdown: emit ## Excerpt/## Content sections and omit the duplicate body H1 (for ssg)false
--preserve-classesCSS classes to preserve from HTML processing (comma-separated, supports wildcards like klaviyo-form-*)-
--preserve-idsElement IDs to preserve from HTML processing (comma-separated, supports wildcards)-
--assisted-crawlCrawl URLs to extract SEO metadata (title, description, og tags)false
--exclude-tagsSEO tags to exclude (comma-separated: title,meta:description,og:title,canonical,lang,hreflangs)-
--crawl-contentCrawl pages with empty content (Bricks, Elementor page builders)false
--skip-empty-contentSkip posts/pages with empty content from exportfalse
--auth-userUsername for Basic Auth (prompts for password if --auth-pass not provided)-
--auth-passPassword for Basic Auth-
--auth-tokenBearer token for authentication-
--rate-limitDelay between API requests in milliseconds (prevents server rate limiting)0
--retriesAttempts for a request the site answers with 5xx or 429, or drops. Exponential backoff with jitter, honouring Retry-After3
--resumeResume from checkpoint if previous export was interruptedfalse
--timeoutHTTP request timeout in seconds (increase for slow servers)30
--verbose, -vEnable verbose outputfalse
--quiet, -qSuppress all output, only return exit codefalse
--configConfiguration 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.