KME Exporter
WordPress plugin that exports KME content into a .zip for porting into SPS2.
by Zaltek Digital · github.com/zaltek-digital/kme-exporter · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/zaltek-digital/kme-exporter/archive/refs/heads/feature%2Fkme-export.zipWordPress plugin that exports KME content for manual import into SPS2.
Description
The KME (Key Molecules Expenditure) WordPress microsite is being retired and its content
moved into SPS2. This plugin is the KME side of that move, and works exactly like the NDO
exporter (zaltek-digital/ndo-exporter). It packages everything on the KME WordPress site
into a single bundle (a zip) that you download from wp-admin. The bundle is then imported
into SPS2 by hand, using the kme-import module in zaltek-digital/sps2 (the KME tab of
SPS → Import there), which rebuilds the pages in SPS2's kme post type.
The charts themselves stay in the KME Laravel app; only the WordPress layer moves.
KME WordPress person SPS2
Tools → Export ──download──▶ bundle .zip ──upload──▶ SPS → Import, KME tab
(or wp kme-export build) → preview → import
It isn't an API and it doesn't sync. Nothing calls into the KME site, and nothing runs on a schedule. A bundle is a snapshot of the site at the moment you download it. Export and import again whenever SPS2 needs to catch up; SPS2 only updates what changed.
Rules this plugin keeps:
- Read-only. It never changes content, settings or users.
- Complete. Every page, post and attachment is exported, except trashed items, along with their revisions. Deciding what to leave out, rename or restructure is SPS2's job, not the exporter's.
- No secrets in the bundle. No passwords, keys or plugin secrets are exported.
- Nothing left behind. The zip is built in a temp file and deleted once it's been downloaded.
- Admins only. Downloading needs
manage_optionsand a valid nonce.
What it exports
For every page, post and attachment that isn't trashed:
- identity and place in the tree: source ID, type, status, slug, title, parent, menu order, URL path
- content: page template, raw block content, excerpt, and a content hash for change detection
- dates and author (login and email)
- post meta (non-protected keys) and terms
- ACF fields by field name: the pages'
blocks(text and collections of pinned reports),summary,change_history, and the reports'date_extractedandparent - computed lists: every embed (
create-block/kme-embedchart URLs,nhs/iframe,core/embed, raw `