Skip to content

Documentation

Migration, Import & Data Operations

Complete guide to moving content into, out of, and between SveltyCMS instances — from external platform migration to backups, export/import, and environment sync.

7/12/2026
9 min read Edit on GitHub

SveltyCMS provides six operational domains for moving content in, out, and between instances. Whether you’re migrating from WordPress, exporting content for a staging environment, or backing up before an upgrade — everything follows a plan-first, preview-before-run safety model.

Tip

Plan-first means you always see what will happen before it happens. Every operation — import, export, backup restore, config promotion — generates a preview plan showing affected resources, conflicts, and risk scores. Nothing is applied until you review and confirm.


Quick Guide: What Do You Need?

You want to… Use Where
Migrate from WordPress, Drupal, or another CMS Smart Importer Admin → Config → Migration tile
Import a WooCommerce / Shopify catalog Smart Importer --format=woocommerce or shopifyproducts
Export content to a file Content Export Admin → Data Management → Export
Import a content package Content Import Admin → Data Management → Import
Back up your entire instance Backup Admin → Data Management → Backups
Restore from a backup Restore Admin → Data Management → Backups
Move config from dev to production Config Promotion Admin → Operations → Config
Sync content between environments Content Sync Admin → Operations → Sync
Transform schema or data across versions Data Migrations Admin → Operations → Migrations

1. Migrating from Another CMS

SveltyCMS includes the Smart AI-Driven Migration Pro plugin — a visual migration wizard that auto-detects your source format and maps fields to SveltyCMS collections.

Supported Source Platforms (40+)

Format Auto-Detection What’s Imported
WordPress (WXR/XML) Posts, pages, categories, tags, media, ACF fields, CMB2 fields
WooCommerce (WXR / REST JSON) Products + variations (SKU, price, sale price, stock) → products
Shopify (JSON / CSV) Products + variants (SKU, price, inventory) → products
Drupal (JSON export) Nodes, taxonomy, users, files, paragraphs
Strapi (JSON export) Collection types, single types, components, media
Directus (JSON export) Collections, fields, relations, files
SveltyCMS (package) Full content packages with identity matching
CSV Flat data with column-to-field mapping
JSON Nested or flat JSON with heuristic structure detection

Migration Workflow

  1. Enable the plugin — Go to Admin → Config. The Migration tile appears when the Smart Importer plugin is installed.
  2. Upload your export file — Drag and drop your WordPress WXR, Drupal JSON, or CSV file.
  3. Auto-detection runs — SveltyCMS identifies the source format, extracts content types, and suggests field mappings.
  4. Review the mapping — Adjust field mappings in the visual transformation tree. You can remap, skip, or transform any field.
  5. Preview the import — See exactly which entries will be created, updated, or skipped before running.
  6. Run the import — Content streams in via SSE with real-time progress. Failed rows go to a dead-letter queue for manual review.
Note

The Smart Importer is a marketplace plugin. See the plugin documentation for installation and platform-specific guides (WordPress, Drupal). WooCommerce and Shopify catalogs import into the ecommerce preset products collection — see E-Commerce Overview. After import, the Commerce Inventory dashboard widget (14-day trial) shows low-stock SKUs.


2. Exporting & Importing Content

The Content Transfer system exports and imports editorial content as portable .svelty-package files with NDJSON streaming.

Export Content

  1. Go to Admin → Data Management → Export.
  2. Select the collections to export (or export everything).
  3. Choose format: JSON (small datasets) or Package (large datasets with media).
  4. Review the export plan — shows entry counts per collection.
  5. Download the .svelty-package file.

Import Content

  1. Go to Admin → Data Management → Import.
  2. Upload a .svelty-package file.
  3. Review the import plan — shows creates, updates, skips, and conflicts.
  4. Choose a duplicate strategy:
    • Skip — Don’t import entries that already exist
    • Update — Overwrite existing entries with imported data
    • Create copy — Import as new entries with deduplicated slugs
    • Fail — Stop if any duplicate is found
  5. Apply the import. Media references and relations are automatically remapped.

API reference: Content Export & Import — full endpoint documentation with NDJSON streaming, identity matching, and duplicate resolution.


3. Backup & Restore

The Backup system creates full-instance snapshots with AES-256-GCM encryption and SHA-256 integrity verification.

Create a Backup

  1. Go to Admin → Data Management → Backups.
  2. Click Create Backup.
  3. Optionally set an encryption password (AES-256-GCM) for sensitive data.
  4. The backup captures: collections, entries, media, settings, roles, permissions, themes, widgets, and automations.
  5. Backups are stored as .svelty-backup directories with a manifest and checksums.

Restore from Backup

  1. Go to Admin → Data Management → Backups.
  2. Select a backup from the list.
  3. Click Restore Plan — previews what will be restored, what’s missing, and any conflicts.
  4. Review the plan. The system enters maintenance mode during restore to prevent data corruption.
  5. Confirm and execute the restore.
Caution

Restore replaces the current instance state. Always create a fresh backup before restoring. Restore requires admin permission and a maintenance lock.

API reference: Backup & Restore — full endpoint documentation with encryption, validation, and tenant isolation.


4. Configuration Promotion (Schema as Code)

Move CMS configuration (collections, roles, permissions, settings, widgets, themes, webhooks, automations) between environments — typically dev → staging → production.

SveltyCMS follows a Schema as Code paradigm similar to Drupal’s drush cex/drush cim (Configuration Export/Import) and Directus 12.3 Environment Sync:

  • Collection Schemas live as TypeScript files in config/collections/*.ts (version-controlled in Git).
  • System Configuration is exported to deterministic JSON bundles in config/sync/.
  • Database State is reconciled via ConfigService with drift detection and safety modes (add, merge, mirror, replace).

Workflow

  1. Make Changes in Development — Create or modify collections using the visual Collection Builder (which updates config/collections/*.ts) or adjust system settings.
  2. Export Configuration — Run POST /api/config/export or go to Admin → Operations → Config Sync to export the active configuration to config/sync/.
  3. Commit to Git — Commit config/collections/ and config/sync/ to your version control repository and open a Pull Request.
  4. Deploy to Staging / Production — After merging, deploy the code to the target environment.
  5. Check Drift & Review Plan — The system checks drift (GET /api/config/status / POST /api/config/plan) to detect what is new, updated, or deleted.
  6. Apply the Plan — Apply the configuration via the UI or POST /api/config/apply. All operations are audit-logged with deterministic checksums.
Important

Configuration Promotion moves structure (schemas, settings, roles), not content. Use Content Transfer for editorial content packages, or Content Sync for real-time channel synchronization.

API reference: Configuration Promotion — full endpoint documentation with resource types, drift detection, safety modes, and audit logging.


5. Content Sync (Cross-Environment)

Synchronize editorial content between environments via configurable channels — e.g., pull production content to staging for testing, or push curated content to production.

Setup

  1. Go to Admin → Operations → Sync.
  2. Create a channel: define source instance URL, target instance URL, and which collections to sync.
  3. Choose direction: push (send to target) or pull (fetch from source).

Safety Features

  • Disabled by default — Content sync must be explicitly enabled per channel.
  • Plan-first — Always preview what will be synced before executing.
  • PII anonymization — When pulling from production to dev, personally identifiable information is automatically anonymized.
  • Conflict review — Sync stops and shows conflicts before any data is written.

API reference: Content Sync — full endpoint documentation with channel management, PII anonymization, and conflict resolution.


6. Data Migrations (Schema & Content)

Apply versioned, idempotent transformations to your schema and content — useful when upgrading SveltyCMS versions or evolving your data model.

Workflow {#data-migrations-workflow}

  1. Go to Admin → Operations → Migrations.
  2. View migration history — all applied and pending migrations with their planHash.
  3. Plan a migration — the system risk-scores it as safe, warning, or destructive.
  4. Apply — each migration runs exactly once (idempotent via planHash deduplication).
  5. Verify — confirm the migration produced the expected result.

Safety Features {#data-migrations-safety}

  • Cross-adapter locking — Prevents concurrent migration runs across all database adapters.
  • Risk scoring — Destructive migrations (column drops, data deletion) are flagged.
  • Checksummed ledger — Every applied migration is recorded with its planHash for audit.

API reference: Data Migrations — full endpoint documentation with risk scoring, locking, and verification.


Design Principles

All six data operation domains follow the same safety rules:

  • Plan-first — Nothing is applied without a preview.
  • Identity by ID, not name — Resources are matched by _id or deterministic checksums, never by display labels or filenames.
  • No content in config — Configuration promotion moves structure. Content transfer moves editorial data. They never mix.
  • Default-safe merge — Import and sync default to non-destructive strategies (skip, not overwrite).
  • Secrets excluded — Users, sessions, tokens, secrets, audit logs, and job state are never included in exports or sync by default.
  • Database-agnostic — No operation depends on a specific adapter’s internal table names or query syntax.

Related

migrationimportexportbackupsyncwordpressdrupaldata-operations
Was this page helpful?