A comprehensive WordPress content export toolkit with two powerful applications:
Both tools export content to JSON or Markdown format with full media download support.
git clone https://github.com/tradik/wpexporter.git
cd wpexporter
make build
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 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
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) | json |
--brute-force |
Enable brute force ID discovery | false |
--max-id |
Maximum ID for brute force | 10000 |
--download-media |
Download images and videos | true |
--concurrent |
Concurrent downloads | 5 |
--zip |
Create ZIP archive of export | false |
--no-files |
Remove export files after creating ZIP (requires –zip) | false |
--config |
Configuration file path | - |
# 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]
H --> J[Output Files]
I --> J
git 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.