MIT Open source · run end to end on real WordPress sites
Move WordPress to EmDash. Prove nothing was lost.
wp2emdash rebuilds WPBakery, Salient, Gutenberg, classic and Bricks sites as editable EmDash sections on Cloudflare Workers, carries content, media, forms, SEO and every old URL, and stops at a gate whenever the result doesn’t match the live site.
pnpm install && pnpm wp2emdash
$ pnpm wp2emdash run example verify ▶ verify • Pages (42) ✔ Pages • Old addresses (318) ✖ Old addresses — 317/318 accounted for • Visual diff (126) ✔ Visual diff • Accessibility & performance (42) ✔ Accessibility & performance ✖ Every old address answers 200, one 301 to a 200, or 404/410 by decision — 1 of 318 unaccounted — page 1: /spring-offer/ (404, no decision) ✖ verify gate failed exit 2 # owner: the offer is over, answer 410 → overrides.ts $ pnpm wp2emdash run example verify ▶ verify ✔ Pages ✔ Old addresses — 318/318 accounted for ✔ Visual diff ✔ Accessibility & performance ✔ verify gate passed exit 0
- unmapped content nodes on the real WPBakery/Salient site
- 0
- of the live site’s page text carried over
- 100%
- in-scope WordPress features done in the parity audit
- 87 / 103
- automated tests, golden fixtures per element
- 1889
Pipeline
Eight phases. Each ends in a gate.#
A phase runs only when every earlier gate has passed, or was accepted by the owner with a written reason. Gates are data — checks with an id and a pass/fail — so the terminal, CI, the dashboard and Claude Code read the same result.
-
01
init
Workspace, site config, and the access and backup checklist the owner signs off.
Gate provesEvery access item the migration needs is in hand before anything is read.
access-missing -
02
audit
Crawl, screenshots, design tokens, menu motion, forms, integrations and the builder fingerprint. Public site only.
Gate provesThe site is reachable, its builder is supported, and sensitive-data handling is decided.
home-reachablebuilders-supportedsensitive-data-flagscreenshots -
03
extract
Content, meta, SEO, menus, forms, plugin exports and media through the EmDash Exporter. Read-only.
Gate provesFetched counts match WordPress’s own totals and every page the audit found is in the export.
counts-matchmedia-downloadedaudit-crosscheck -
04
transform
Builder layouts, posts and custom content into a typed section format.
Gate provesNo content is unmapped, the live page text is all there, and every post type is migrated or decided.
unmappedtext-conservationcontent-types-handled -
05
scaffold
The EmDash project: section library, tokens, header and menu motion, plugin suite, performance package, docs and CI.
Gate provesEvery section type has a component, the seed passes EmDash’s validator and the project type-checks.
section-componentsseed-validtypecheck -
06
load
Content, media, menus, taxonomies, redirects and settings through the EmDash API. An id-map makes reruns idempotent.
Gate provesEntry counts equal the source, no WordPress URLs or shortcodes remain, and every page renders.
countsid-mapno-wordpress-leftoversrender -
07
verify
Old against new, URL by URL: text, SEO, links, forms, consent, cache, accessibility and a visual diff per section.
Gate provesEvery old address is accounted for, SEO is identical, forms submit and nothing tracks before consent.
urls-accountedseo-titleforms-submitconsent-runtimea11y -
08
cutover
A read-only preflight and runbook, then the owner-approved switch with
goliveand a one-step rollback.Gate provesWorker and domain share an account, no other route holds the domain, and mail records are snapshotted.
same-accountroutes-freedns-snapshotindexable
Exit codes are part of the contract: 0 passed, 2 gate failed, 3 not built yet, 1 error. Only the owner can accept a failed gate, with wp2emdash accept --reason, and the reason is logged.
Dashboard
A migration, step by step, in the browser#
pnpm wp2emdash ui opens a local dashboard for everything a terminal can’t show well: where each site stands, screenshots and diffs, changes waiting for approval, and the launch. Phases still run from the terminal or the wizard, and the dashboard streams them live. The pictures below are drawings of the real screens, filled with made-up data.
-
Open the portfolio
Run
pnpm wp2emdash ui. It serves on127.0.0.1only, behind a token that is new on every start, and opens your browser.Every site in
sites/gets a card: the eight phases as a bar, a launch-readiness score, what blocks launch, the last run and the exact command to run next, with a copy button. -
See what blocks launch
A site’s Overview shows every gate (passed, accepted with the owner’s reason, or failed) and turns the failing checks into a to-do list. Each item has the command or the screen that fixes it.
The readiness score is simply the share of launch checks that pass: pipeline gates, verify checks and the cutover preflight.
-
Run a phase and watch it live
Run the phase from the terminal or the wizard. The dashboard streams its steps, item counts and log as they happen, and keeps every past run on the Runs tab.
Gates are data, so the terminal, CI, Claude Code and the dashboard all show the same result.
-
Compare WordPress and EmDash
Every page at phone, tablet and desktop widths: drag the slider, view them side by side, or show only the changed pixels. A table lists the difference section by section.
Approve or reject a difference with a reason, and a dated row goes into
decisions.md. That never passes the gate on its own: the owner still accepts it withwp2emdash accept. -
Approve the fixes
Click a row on the WordPress screenshot in the Section inspector to see its source and what it became. “Change section type” or “Drop row” writes a proposal. Claude Code’s suggestions land in the same queue.
Each proposal shows the exact change to
overrides.tsordecisions.md. Approving applies it and can start a preview run of transform, scaffold or verify. It never starts load or cutover. -
Hand over keys safely
The Secrets tab takes each key in a write-only form: the migration key, the app password, Cloudflare and email keys. Values go to the site’s
.envand are never shown again, only “set” and a short fingerprint.The owner’s checklist (
ACCESS.md) is shown next to it, so missing access is visible before the first phase runs. -
Launch with the owner’s approval
The Launch cockpit shows the cutover preflight, the runbook and each step: go live, alias redirects and rollback. “Show plan” lists exactly what will change and changes nothing.
A step runs only after you type the production domain, tick that the owner approved it in writing and record who approved it and when. It runs the same
golivecommand as the terminal. DNS is never changed.
Handover: each site’s overview has a Handover pack card that opens the printable pack for the owner (sign-in, editing each section, forms, tools, who to call). After launch: the Fleet page lists every site with the kit version it was built with, its last change, its last upgrade check and open owner to-dos. The dashboard writes only what you decide in it: decisions, approved proposals, keys and the owner-approved launch steps. It never accepts a gate and never changes DNS.
Coverage
What it migrates#
Builders are adapters on one shared core. Anything the kit doesn’t carry appears in the coverage report and keeps a gate red until the owner decides. Nothing is dropped silently. Feature by feature: the parity audit.
103 in-scope WordPress features tracked against EmDash 1.5 110 in total, 7 out of scope
- 87 done
- 6 superseded by EmDash
- 10 partial
- 0 missing
90%carried or superseded
| Source | Status | What happens |
|---|---|---|
| WPBakery + Salient | Supported | ~70 element handlers and row recognisers: rows, columns, CTAs, team, testimonials, pricing, marquees, global sections. Spacing and type measured on the live theme. |
| Gutenberg, classic | Supported | 30 core blocks and reusable blocks; classic content paragraph-faithful, its shortcodes through the shortcode parser. |
| Gutenberg block libraries | Built | Kadence, Spectra, GenerateBlocks, Stackable and CoBlocks layouts, headings, buttons, icon lists, info boxes, tabs, accordions, testimonials and form blocks. Not yet run on a real site. |
| Bricks 2.4.6 / 2.5 | Supported | Elements, header/footer/popup templates, global classes, palette, components and forms. Measured against a real Bricks site. |
| Elementor | Built | Containers and legacy sections, Kit globals, Theme Builder header/footer, Pro forms and popups. Tested every night against a real WordPress with Elementor (made-up content); not yet run on a client’s Elementor site. |
| Divi | Built | Divi 4 sections and ~30 modules, global colours, contact forms, Theme Builder header/footer; Divi 5 read best effort. Not yet run on a real Divi site. |
| Blog | Supported | Posts as Portable Text, categories, tags and custom taxonomies, guest bylines, paginated archives and RSS, all at their WordPress addresses. |
| Custom post types | Supported | Each public type becomes its own collection with archives; ACF, Meta Box and Pods fields mapped to EmDash fields, including ACF repeaters, links and galleries. ACF flexible content becomes page sections; options pages are listed for a decision. |
| Comments | Built | Approved comments with their date, author and thread, moderated comment form with Turnstile. Not yet run on a real site with comments. |
| SEO | Supported | Titles, descriptions, canonicals, robots, JSON-LD, sharing images, verification tags, robots.txt and sitemap; Rank Math and Yoast data carried. |
| Forms | Supported | Contact Form 7, Gravity Forms, WPForms, Fluent, Ninja, Formidable, WS Form, Forminator, Elementor Pro, Bricks and Divi forms rebuilt on a native endpoint: file uploads, conditional fields, multi-step, waivers with signatures. |
| Redirects, old URLs | Supported | Redirection, Rank Math and Yoast redirects imported; ?p=, ?page_id=, upload, feed, search and archive URLs answered by a per-site rule set. |
| Settings, site code | Supported | EmDash settings prefilled from WordPress; tracking, chat and review widgets recognised from 46 known providers. Unknown code is never carried automatically. |
| Header, menus, popups | Supported | Header layout and burger-menu motion measured from the live site; popups with their triggers; announcement bars as an editable site part; every menu, classic widget areas, a search page, breadcrumbs and the old 404 page. |
| Other builders | Built | Avada, Beaver Builder, Oxygen, Breakdance, Thrive, SiteOrigin, Flatsome and plain themes: pages rebuilt from the rendered HTML and held for a visual review. Not yet run on a real site. |
| WooCommerce catalogue | Built | Small shops by owner decision: products at their WordPress addresses with price, sale price, gallery and variations, a Buy button to an external checkout, Stripe Payment Links or the contact form, a product grid section, and Product structured data. Tested every night against a real WooCommerce (made-up products); not yet run on a client’s shop. |
| Multilingual (WPML, Polylang) | Built | Every language keeps its address (/fr/… directories), with hreflang links, a language switcher, menus per language, and a blog per language (archives, feeds, previous/next and related posts stay in the reader’s language). Tested every night against a real WordPress with Polylang (made-up content); WPML and client sites not yet. |
| Carts, memberships, courses | Not yet | Full checkout, subscriptions, memberships, courses, booking plugins, ticket sales, forums, visitor logins and multisite are detected by the estimate and the audit, which stops for a decision. |
Plugin suite
An admin plugin suite in every site#
Nine PixelKraft plugins ship with every site as native pages in the client’s own EmDash admin: no extra accounts, no outside services. Each one is a line in the site’s kit.config.ts and takes effect at the next scaffold.
| Plugin | What the client sees | Admin page | Default |
|---|---|---|---|
| SEO & Analytics@wp2emdash/seo | A score, Google preview and plain-words checklist next to every page; Search Console, IndexNow, tracking codes by ID (loaded after the page has drawn) and Cloudflare Web Analytics visits. SEO fix-it drafts missing descriptions and focus keywords with Workers AI, for an editor to approve. | Page editor · Plugins → SEO & Analytics | On |
| Sharing images@wp2emdash/og | A branded og:image per page, drawn in the Worker from the site’s logo, colours and fonts, stored in R2. | Plugins → Sharing images | On |
| Site health@wp2emdash/health | Scheduled checks for uptime, indexability, broken links, form email, mail DNS and speed; addresses visitors miss after launch, each with a suggested page and a one-click redirect; a weekly PageSpeed score; a weekly visual and accessibility check of the main pages; warnings for past dates and pages left untouched; “What to improve this month” in the branded monthly report. | Plugins → Site health | On |
| Privacy & consent@wp2emdash/consent | A cookie banner (opt-in for EU/UK, notice elsewhere) that trackers follow, with Google Consent Mode v2. | Plugins → Privacy & consent | On |
| Backups & restore@wp2emdash/backups | Nightly content backups to the site’s own storage; restore settings, menus or a single page with a preview of every change. A monthly restore test proves the newest backup can actually be restored. | Plugins → Backups | On |
| Media assistant@wp2emdash/media | Media health, optimizing with undo, alt-text suggestions a person reviews, focal points and a 30-day trash. | Plugins → Media | On |
| Change requests@wp2emdash/change-requests | Ask for a change from inside the admin, with page, priority and screenshots; follow its status and replies. | Plugins → Change requests | On |
| Motion@wp2emdash/motion | First-visit logo preloader, page transitions, entrance animations, hover lift, smooth scrolling. Every effect off until the owner switches it on; reduced motion always respected. | Plugins → Motion | Panel on, motion off |
| Form messages@wp2emdash/forms | An outbox that holds form messages until email works, with inbox, search, export and editable recipients. Optional lead sync to Brevo, HubSpot or Mailchimp, field by field and with consent. | Plugins → Form messages | OnOff on sensitive-data sites |
Migrated sites also carry a small “Website by PixelKraft” credit in their footer by default; one line in the site’s config turns it off.
Launch & operations
Nothing public changes until the owner says go#
One Cloudflare environment per site by default: production, reviewed on its workers.dev address until launch. Staging is opt-in. Production can live in the client’s own Cloudflare account.
provisionCreate resources
Database, storage, outbox and sessions bucket, in the account that owns the domain.
run loadLoad content
Idempotent writes through the EmDash API. Loads into a live site record a database bookmark first.
run verifyCompare with live
The deployed site against the WordPress original, URL by URL, at phone, tablet and desktop widths.
goliveSwitch the domain
Prints its plan and changes nothing until the owner approves: routes, smoke test, DNS comparison, live flag.
golive --rollbackWatch or roll back
Rollback removes exactly the routes it created. Site health and nightly backups watch the site after launch.
Honest status: golive and publish are built and unit-tested against mocked Cloudflare and GitHub. They have not yet been run on a launch.
- Publish to the client’s repo
publishscans for secrets, creates a private GitHub repository and pushes the project; its CI deploys it.- Launch cockpit
- Readiness per site, live runs, visual review, environments and Worker secrets. Go-live needs the domain typed and the owner’s written approval (see the dashboard).
- Bookmarks before writes
- Every load into a live site and every go-live records a D1 Time Travel bookmark, with its restore command.
Operations
Built for an agency with many sites#
From the first quote to years of updates: each tool reads before it writes, and nothing touches production without the owner’s approval.
estimate <url>Quote a prospect
Reads a prospect’s public WordPress site politely (no login) and writes a branded client report plus an internal effort sheet: builder, plugins, forms, speed, blockers and an hours range from rules you tune.
deploy checkRoll back a bad deploy
After every deploy the site is checked like a visitor would: every page, its fonts, stylesheets, scripts and hero picture. If anything is broken, the Worker is rolled back to the version that was live before.
upgrade <slug>Upgrade with proof
Captures every live page, rebuilds on the new kit, deploys staging if you ask, and compares page by page. It prints the production command for the owner and never runs it;
--verifychecks production afterwards.fleetEvery site at a glance
One table with the kit version each site was built with, its last change, its last upgrade check, live status and owner to-dos.
fleet upgrade-prsopens upgrade pull requests on a separate branch, never on main.monitorWatch from the outside
One small Worker loads every site’s home page every 5 minutes and checks certificate and domain expiry daily. It alerts by email, Telegram or Slack, even when a site’s own Worker or account is down.
e2e: real WordPressTested on real WordPress, nightly
A throwaway WordPress in CI with Elementor, WooCommerce, Polylang, Contact Form 7 and Fluent Forms runs through the whole pipeline every night, ending with the same page-by-page comparison against WordPress that a client launch must pass. Its runs caught bugs that made-up fixtures could not: a build failure for new projects, lost quote text, every translated page answering 404, French archives mixing in English posts and button text too faint to read.
changes <slug>Keep up with a client still editing WordPress
Lists what changed in WordPress since the previous extract: new, edited, moved and deleted pages, menus, media and forms. Load then keeps pages edited in EmDash’s admin and lists the ones changed on both sides as conflicts.
handover <slug>Hand the site to its owner
Writes a printable handover pack from the site’s real setup: how to sign in, how to edit each kind of section the site uses, where form messages go, which tools are on, and who to call. Only what that site has.
pnpm privacyKeep client data out of the code
Every commit and every push is checked for client names, domains and email addresses, from patterns that never enter the repository. The output names the file and line, never the match.
sync-staging <slug>Test on real content
Copies production’s content to staging from an explicit list of tables, without users, form messages or secrets. It shows a plan first and bookmarks staging before writing.
Defaults
Performance and security, measured#
Every generated site ships the same package, and verify measures it on the deployed site instead of assuming it.
- Route cache
- Pages kept in Cloudflare’s cache next to visitors, purged within seconds of a publish and warmed on deploy. On staging a cached page answered in 80 ms instead of 0.8–1.8 s.
- Images and video
- Sized images through the Cloudflare Images binding, brand files and fonts cached for a year, background video attached after first paint.
- Content-Security-Policy
- One provider table decides what may load; inline scripts on visitor pages by hash. Trackers never load for signed-in editors or on test hosts.
- Consent that holds
- Analytics and marketing tags wait for the visitor’s choice; verify checks in a real browser that nothing fires before it.
- Sessions on R2
- Admin sessions in a private, strongly consistent R2 bucket instead of Workers KV, which signed editors out at random.
- Forms without leaks
- Turnstile, rate limiting and validation on a native endpoint. On health, legal or finance sites the owner picks a policy that keeps sensitive text out of the Worker and email.
Workflow
One engine, three front-ends#
Every decision ends up in versioned files — overrides.ts, decisions.md — so a full rerun from the raw exports reproduces the result.
- Terminal
- A guided wizard: create a site, run each phase, record gates.
--jsonon every command for scripts and CI. - Browser dashboard
- Local on 127.0.0.1, token-protected. Reviews, approves, takes secrets in a write-only form and shows only their fingerprint. See it step by step.
- Claude Code
- An MCP server and four skills run phases and explain red gates. Proposed changes wait in an approval queue for a person.
Get started
From clone to a verified site#
Requires Node.js 24+ and pnpm. Generated sites deploy to Cloudflare Workers (Workers Paid plan) on the latest Astro that EmDash supports.
# install and check prerequisites git clone https://github.com/nurkamol/wp2emdash cd wp2emdash && pnpm install cp .env.example .env # Cloudflare token pnpm wp2emdash doctor # a site workspace (or just `pnpm wp2emdash`) pnpm wp2emdash init --slug example --name "Example" \ --source https://www.example.com # each phase stops at its gate pnpm wp2emdash run example audit pnpm wp2emdash run example extract pnpm wp2emdash run example transform pnpm wp2emdash run example scaffold pnpm wp2emdash provision example pnpm wp2emdash run example load pnpm wp2emdash run example verify pnpm wp2emdash run example cutover # read-only preflight
- READMECommands, plugin suite, environments, launch and every option.
- DocsThe plan, parity audit, API tokens and every verified platform fact.
- Environment setupProduction on workers.dev, opt-in staging, first sign-in, CI.
- ChangelogWhat changed, by day and milestone.
- EmDash docsThe CMS the kit migrates to.