SiteCargo logo

SiteCargo

Selectively promote WordPress Full-Site-Editing structure between environments — without a full database migration.

Patterns · templates · template parts · global styles · navigation

Packagist PHP >= 7.4 WordPress >= 6.5 License GPL-2.0-or-later

The problem

FSE structure lives in the database. Moving some of it from staging to production today means a full DB sync — destructive to orders, users, and form entries — or tedious manual copy-paste.

Selective

Promote exactly the entities you choose. Everything else on the target is left untouched.

Portable bundles

Export to a self-describing, git-trackable folder: a manifest, one JSON per entity, plus referenced media.

Idempotent

Re-applying updates the same entity instead of duplicating it — matched by stable identity or theme + slug.

Reference remapping

Numeric IDs baked into block markup (images, reusable blocks, navigation) are re-resolved to the target site.

Media-aware

Referenced media is imported and de-duplicated by content hash, with URLs and IDs rewritten in the markup.

Diff before apply

Preview exactly what would be created, updated, or left unchanged — without writing anything.

How it works

A bundle is just files you can review, commit, and move between environments however you like.

your-bundle/ ├─ manifest.json # schema version, source site, entity index + checksums ├─ entities/ │ └─ wp_block/<slug>.json # one file per exported entity (content + references) └─ media/ ├─ <sha256>.<ext> # content-addressed media blobs (deduped) └─ media.json # id → hash → url map for sideloading on import

Install

SiteCargo is a WP-CLI tool — WP-CLI is required.

# Composer (Bedrock and other Composer-managed sites)
composer require itzmekhokan/sitecargo
wp plugin activate sitecargo

# WordPress.org directory (once approved)
wp plugin install sitecargo --activate

# Manual: download a release zip, unzip into wp-content/plugins/, activate

Usage

Three commands: export on the source, diff & apply on the target.

# On the source — export structure into a bundle
wp sitecargo export --all --dir=my-bundle
wp sitecargo export --patterns --templates --parts --global-styles --navigation --dir=my-bundle
wp sitecargo export --patterns --slug=hero,call-to-action --dir=my-bundle

# On the target — preview what would change (no writes)
wp sitecargo diff --dir=my-bundle

# On the target — apply (remaps IDs, sideloads media)
wp sitecargo apply --dir=my-bundle --yes

Roadmap

SiteCargo is early software (0.1.1). The export → import loop is complete for five entity types.

PhaseScopeStatus
1–2Patterns + import side (diff / apply, ID remapping, media sideloading)done
2bTemplates, template parts, global styles (theme + slug identity)done
3aNavigation menus + reference remappingdone
3bSelected posts/CPTs by slug (+ navigation-link ID remapping)planned
4Admin UI (checkbox tree + visual diff)planned
5Direct site → site push over REST (application passwords)planned