block-to-element-migration

Migrate SilverStripe Blocks to Elemental with PHP and SQL.

1|Updated May 12, 2026
One-click install
npx skills add https://github.com/jsirish/silverstripe-skills --skill block-to-element-migration-jsirish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: block-to-element-migration
Source: https://github.com/jsirish/silverstripe-skills/tree/main/skills/block-to-element-migration
Command: npx skills add https://github.com/jsirish/silverstripe-skills --skill block-to-element-migration-jsirish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires silverstripe/silverstripe-elemental, silverstripe/silverstripe-version-upgrade, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the migration of legacy SilverStripe Blocks to SilverStripe Elemental, ensuring a seamless visual parity post-upgrade, saving time and reducing the risk of human error.

Core Features & Use Cases

  • Automated Data Migration: Migrates block data from SilverStripe 3 to 4, preserving all elements and their relationships.
  • Template Parity: Generates elemental templates that produce the same HTML as legacy block templates, ensuring no visual changes after the upgrade.
  • Use Case: Imagine you have a SilverStripe 3 site with a custom block structure. Use this Skill to automate the migration process, ensuring your upgraded site retains the same visual layout and functionality.

Quick Start

Use the block-to-element-migration skill to migrate your legacy blocks to Elemental during an SS3→SS4 upgrade. Run: ddev sake dev/tasks/block-migration

Frequently Asked Questions about block-to-element-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate SilverStripe blocks to Elemental during a version upgrade?

Migrating SilverStripe blocks to Elemental involves running the automated migration task using `ddev sake dev/tasks/block-migration`. This process preserves legacy block and SiteTree_Blocks data while generating elemental templates during your SS3 to SS4 upgrade.

How does template parity work when migrating legacy blocks to Elemental?

Template parity during migration works by automatically generating elemental templates that produce the exact same HTML output as your legacy block templates. This mechanism ensures your site maintains complete visual consistency post-upgrade without any layout shifts.

Do I need SilverStripe Elemental to use the block migration script?

Yes, you need the SilverStripe Elemental module installed to use this block migration script. The migration requires a SilverStripe 3 or 4 environment and depends on both the silverstripe-elemental and silverstripe-version-upgrade packages to map data correctly.

What is the best way to preserve SiteTree_Blocks data in SilverStripe 4?

The best way to preserve SiteTree_Blocks data is to use an automated migration script that maps the legacy relationships directly to Elemental elements. This approach utilizes PHP and SQL to securely transfer data during the version upgrade without manual database entry.

Can I automate SilverStripe block to Elemental migration without manual data mapping?

Yes, you can automate SilverStripe block to Elemental migration without manual data mapping. The migration script handles the data transformation automatically using PHP and SQL, reducing the risk of human error and saving time during the version upgrade.

Why does my SilverStripe block to Elemental migration risk visual inconsistency?

Visual inconsistency after a block to Elemental migration usually happens when templates are not properly mapped. This migration script prevents that by generating elemental templates specifically designed to match the legacy block HTML output exactly.