Developer Journal

Advanced · 8 minute read

Import Drupal Configuration Before Creating Content Entities

Why configuration UUIDs matter, how the wrong deployment order blocks imports, and the safe config-first sequence.

Last updated August 6, 2026

A deployment can fail even when its field names and bundles look identical. Drupal configuration entities carry UUIDs, and creating content types or Paragraph types independently in each environment produces different identities.

The symptom

drush config:import reports that content or Paragraph entities must be deleted before configuration can be imported. The import plan may appear to create and delete similarly named configuration.

The cause

A migration script created configuration entities and content before the canonical exported configuration was imported. Drupal correctly refused to replace bundles that already contained content.

The safe sequence

  1. Back up the database.
  2. Deploy module and theme code.
  3. Import config/sync.
  4. Run idempotent content migrations.
  5. Rebuild caches and verify routes.

Prevention

Store field storage, field instances, form displays, content types, and Paragraph types in configuration. Store editorial copy and entity revisions in the database. Test the exact sequence on stage before production.