Content Migration into Sitefinity CMS Dynamic Modules

sitefinity | 2023-04-20

⚙️ Introduction

Content migration can be a real hassle.
When dealing with structured content, you often need to go through each row of exported data, copying and pasting it manually into the appropriate forms for each content type.
And, of course, every piece must be reviewed before it goes live.

In Sitefinity CMS, the way content is organized — especially with custom content types or dynamic modules — involves complex relationships between multiple database tables.
Most of the time, we are forced to manually copy and paste content for migration purposes.

Fortunately, we figured out how these tables are related and even developed scripts to import content directly from Excel files into Sitefinity’s backend.


🔥 The Goal

Efficiently migrate structured content from Excel into Sitefinity’s database as drafts, allowing a second round of review before final publication.

🧠 Findings: Table Relationships

When you publish a piece of content in Sitefinity, it automatically generates records across several tables:

TablePurpose
<generated_content_type_table>Stores the raw content record (3 records per item, sharing the same base_id)
sf_dynamic_contentTracks the content’s state, versioning, and lifecycle (3 records with different status/version per item)
sf_language_dataLinks the dynamic content to its language version
sf_dynmc_cntnt_sf_lnguage_dataFurther language-specific metadata per content version

Key Insight:

Each content item creates three records (master, temp, published) across these tables when published.


🔍 Pre-requisites

  • Working knowledge of Sitefinity CMS
  • Understanding of dynamic modules / custom content types
  • Basic SQL scripting skills
  • Familiarity with Excel data handling

✅ Migration Process Summary

  1. Create a custom content type in Sitefinity matching the old dataset's structure.
  2. Build SQL scripts to insert records into the four key tables:
    • <generated_content_type_table>
    • sf_dynamic_content
    • sf_language_data
    • sf_dynmc_cntnt_sf_lnguage_data
  3. Prepare Excel files and scripts:
  4. Execute the SQL scripts on the database — ensure no execution errors.
  5. Restart the Sitefinity instance (to clear cache and reload content).
  6. Review the migrated content in the CMS and publish after confirmation.

📚 Helpful Resources