Import a static site or generated website artifact into WordPress pages and an intentional companion block or classic theme.
Static Site Importer (SSI) is a WordPress plugin. It takes pasted HTML, website files, a ZIP, a public URL, a Figma design or a generated website artifact. It compiles the content with the Blocks Engine PHP transformer, then writes the result into WordPress as native, editable pages and a generated theme.
- WordPress 7.1 or later.
- PHP 8.3 or later.
- Composer dependencies. Release ZIPs bundle them; for a checkout, run
composer install.
Install a release ZIP like any plugin, or try it with no install in the Playground demo above. SSI requires automattic/blocks-engine-php-transformer with a stable caret range; the committed lockfile pins the exact release.
SSI is an infrastructure plugin. Its surfaces are WordPress abilities, WP-CLI, REST and PHP APIs. It registers no wp-admin screen. The import form in the Playground demo comes from a separate demo plugin that calls the REST API.
WP-CLI. wp static-site-importer import takes exactly one of --request=<json file>, --url=<url> or --plan=<saved plan>:
wp static-site-importer import --url=https://example.com/ --slug=example --activate
wp static-site-importer import --url=https://example.com/ --operation=plan --slug=example > plan-receipt.json
jq '.response' plan-receipt.json > plan.json
wp static-site-importer import --plan=/absolute/path/to/plan.jsonThe command handles continuation by itself and prints one JSON receipt. It exits non-zero only on a genuine import failure. See WP-CLI for every option, request files, resuming a run, and the media, recompose, materialize-wordpress-site-plan and validate-artifact commands.
Ability and REST. The static-site-importer/import ability is the one canonical contract. It takes source.type (html, files, zip, url or figma) and operation (plan or apply). The ability is exposed through the Abilities REST API. POST /wp-json/static-site-importer/v1/imports normalizes a source and runs the same ability. A plan needs edit_posts; an apply needs switch_themes. See REST API and abilities for the other abilities and the URL and ZIP intake rules.
- Pages. Each source document becomes a native WordPress page, with its body stored as block markup in
post_content. Local.htmllinks are rewritten to permalinks, andindex.htmlbecomes the front page when the theme is activated. Old URLs keep working through Redirection rules. - A block or classic theme. By default, SSI writes a generated block theme with
theme.json,style.css, header and footer template parts,core/post-contenttemplates and page patterns.--theme-materialization=classicwrites a managed classic theme instead. You can also import into the existing theme. - Navigation. Supported header and footer menus become deterministic
wp_navigationentities referenced from the template parts. - Synced patterns. Shared sections the producer declares become synced
wp_blockpatterns. A reimport reconciles them, and owner edits are kept. - Media. Images go to the Media Library. Captures with deferred media import first and fetch their media in later batches.
- Plugins and entities, when the source needs them. These include WooCommerce products, Jetpack forms, Redirection rules, The Events Calendar events and TranslatePress translations.
- Site identity. The import sets the title, tagline, logo and icon, and removes untouched WordPress seed content. See Site identity.
- Report-only findings. Every import returns a materialization receipt and an import report. They hold a classified loss ledger, quality scores and diagnostics. Findings report follow-up work but never reject an import that materialized. See Import report.
Generated theme shape describes the exact files. Website artifact export turns a theme back into a portable artifact.
All input is treated as untrusted static content. Non-static files are skipped. Server code in the entrypoint fails the import. URL imports refuse private and reserved addresses. Source JavaScript is removed by default under the inert client script policy. Details are in Content-only security.
- Local imports discover sibling
*.htmlfiles beside the entry file, plus nested Markdown documents. They do not crawl for missing assets. - URL imports collect the sitemap and same-origin linked routes. They do not run JavaScript, and they do not use platform-specific APIs.
- MDX, Astro, Eleventy, Hugo and other build tools are out of scope. Build those sites to static HTML first.
.mdxfiles are skipped and reported. - Navigation persistence is limited to header and footer shapes that convert without guessing.
- Some layouts still import with
core/htmlfallbacks or imperfect visual parity. The import loop below exists to find and fix those cases. - Committed first-party fixtures are
tests/fixtures/wordpress-is-dead/andtests/fixtures/mixed-source-site/. The wider site corpus lives in Blocks Engine.
Most improvements start with a real site that imports badly. The import loop works with ordinary tools:
- Capture the site.
- Re-import it.
- Evaluate it at 390, 768 and 1440 px and in the editor.
- Find which repository owns each defect.
- Reduce the defect to a minimal page.
- File a reproducible issue.
- Fix it with a failing test.
- Confirm the fix on every route.
A coding agent can run any step. Homeboy can run the whole loop unattended. The acceptance bar has three parts: no fallback blocks, visual parity, and native blocks that edit without validation errors.
SSI owns the WordPress side of the stack: intake, safety, materialization, media, providers and reports. Blocks Engine owns compilation and the blocks-engine/wordpress-site-plan. Data Liberation Agent owns site capture. See Stack and the product handoff contract.
- docs/README.md: the index of guides, architecture, contracts and lab pages.
- CONTRIBUTING.md: setup, tests, test philosophy, owning-layer rules, PR conventions and releases.
- AGENTS.md: instructions for coding agents.
- docs/CHANGELOG.md: the release history, generated by Homeboy.
GPL-2.0-or-later.