Level 0 Foundations: Config vs Content in Drupal

One of the most important ideas to understand in Drupal is the difference between configuration and content.

Many early Drupal problems come from mixing these two.

When they are clearly separated, Drupal becomes predictable, scalable, and much easier to maintain.


What Drupal Means by Configuration

Configuration describes how the site is built and behaves.

Configuration answers questions like:

  • What content types exist?
  • What fields are attached?
  • What views are defined?
  • What roles and permissions exist?
  • What blocks are placed where?

Configuration is:

  • Structural
  • Environment-aware
  • Deployable
  • Version-controlled

Common examples of configuration:

  • Content types
  • Field definitions
  • View definitions
  • Image styles
  • Roles and permissions
  • Block placements
  • Site settings

From a system view, configuration defines the shape of the site.


What Drupal Means by Content

Content is the actual data entered into the site.

Content answers questions like:

  • What articles were written?
  • What pages exist?
  • What terms were created?
  • What users signed up?

Content is:

  • User-generated
  • Environment-independent
  • Stored as entities
  • Not deployed by default

Common examples of content:

  • Nodes (articles, pages, events)
  • Taxonomy terms
  • Media items
  • Users
  • Comments

From a system view, content is the data that flows through the structure.


Why This Separation Matters

Drupal is designed to treat configuration and content differently for a reason.

Configuration:

  • Moves between environments
  • Is reviewed in code
  • Is deployed intentionally

Content:

  • Changes daily
  • Is created by users
  • Lives in the database

Mixing these leads to problems like:

  • Broken deployments
  • Lost data
  • Inconsistent environments
  • Hard-to-debug issues

Clear separation keeps environments aligned.


Config First Thinking

A strong Drupal foundation uses a config-first mindset.

This means:

  • Build structure before adding content
  • Define fields before entering data
  • Place blocks using configuration, not templates
  • Control behavior through config, not hardcoded logic

Config-first does not mean content is ignored.
It means content flows into a stable structure.


Common Beginner Mistakes

These issues often appear when config and content are confused:

  • Creating pages instead of content types
  • Hardcoding values that should be taxonomy
  • Editing configuration directly on production
  • Using nodes to store site-wide settings
  • Relying on manual UI changes without exports

These mistakes increase technical debt over time.


How This Shows Up in Real Projects

In a well-structured Drupal site:

  • Configuration is exported and deployed
  • Content is created per environment
  • Production content is never overwritten
  • Structure changes are intentional

This makes it possible to:

  • Collaborate in teams
  • Use CI/CD pipelines
  • Scale safely
  • Roll back changes

Foundation Best Practices

  • Treat configuration as code
  • Never rely on production-only changes
  • Keep structure stable before content entry
  • Review config changes like code
  • Document structural decisions

Strong separation reduces risk and improves confidence.


Why This Belongs in Level 0

Config vs Content is a foundation concept because:

  • It affects every Drupal feature
  • It influences workflows and deployments
  • It impacts long-term maintainability

Before learning advanced topics, this distinction must be clear.


What Comes Next

With Config vs Content understood, the next foundation topics naturally lead into:

  • Configuration management
  • Environments and deployments
  • Views and display logic

Those build directly on this concept.