Skip to content

About

Export your WordPress site as static HTML files. Crawls every page like a browser and saves a complete static copy with all referenced assets.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Static Export WP

Export your WordPress site as static HTML files. Crawls every page like a browser and saves a complete static copy with all referenced assets.

Features

  • Full site crawl — discovers posts, pages, archives, taxonomies, author and date pages automatically
  • Smart asset collection — only copies CSS, JS, images and fonts that are actually referenced
  • URL rewriting — relative paths (works offline/from file://) or custom base URL for deployment
  • Background processing — exports run via Action Scheduler or WP Cron without blocking
  • WP-CLI support — run exports from the command line with progress bars
  • React admin UI — modern dashboard with real-time progress tracking
  • Export history — view past exports with status and statistics

Requirements

  • PHP 8.1+
  • WordPress 6.4+

Installation

# Clone the repo into your plugins directory
cd wp-content/plugins/
git clone https://github.com/open-wp-club/static-export-wp.git
cd static-export-wp

# Install dependencies
composer install
npm install

# Build the admin UI
npm run build

Activate the plugin in Plugins → Static Export, then open Static Export from the admin menu.

WP-CLI

# Full synchronous export with progress bar
wp static-export generate --synchronous

# Export with custom output and base URL
wp static-export generate --synchronous --output-dir=/tmp/export --url-mode=absolute --base-url=https://example.com

# Preview discoverable URLs
wp static-export list-urls

# Check export status
wp static-export status

# Cancel a running export
wp static-export cancel

# Delete exported files
wp static-export clean --yes

REST API

All endpoints require manage_options capability. Namespace: sewp/v1

Method Endpoint Description
GET /settings Get current settings
POST /settings Update settings
POST /export/start Start background export
POST /export/cancel Cancel running export
GET /export/status Get export progress
GET /export/log Export history
POST /export/clean Delete output files
GET /export/discover-urls Preview URL list

Open-source supporters

These companies help keep Open WP Club plugins free and maintained.

Open WP Club supporters

Sponsored placements

Clearly labelled promotional campaigns, separate from our supporters.

Open WP Club sponsored placements

Support our work · Discuss a campaign

Development

# Watch mode for JS development
npm run start

# Run PHP unit tests
./vendor/bin/phpunit

# Check coding standards
composer phpcs

Export cleanup only removes folders marked by this plugin. For an export created before 1.1.1, run an export into the folder first to create the marker. WordPress core and protected directories are rejected.

Releasing

Push a version tag to trigger the GitHub Actions workflow that builds a release ZIP:

git tag 1.1.1
git push origin 1.1.1

The workflow installs production dependencies, builds assets, stamps the version, and creates a GitHub Release with the plugin ZIP attached.

License

GPL-2.0-or-later

About

Export your WordPress site as static HTML files. Crawls every page like a browser and saves a complete static copy with all referenced assets.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages