Migration Guide
Step-by-step guides to migrate from other CMS platforms to decoupled.io.
Migration Overview
The migration process consists of three main phases:
- Content Migration -- Export and import your content, media, and metadata
- Frontend Migration -- Adapt your frontend to use decoupled.io APIs
- Go Live -- Switch DNS and launch your new site
Migrating from WordPress
Content Export from WordPress
- Export WordPress Content -- Use WordPress admin > Tools > Export to download your content as XML
- Convert to Drupal Format -- Use migration tools or custom scripts to convert WordPress XML to Drupal-compatible format
- Import to decoupled.io -- Use Drupal's migration tools to import your converted content
WordPress to Drupal Field Mapping
| WordPress | decoupled.io (Drupal) | Notes |
|---|---|---|
| Post Title | Node Title | Direct mapping |
| Post Content | Body Field | HTML content preserved |
| Categories | Taxonomy Terms | Create matching vocabulary |
| Tags | Taxonomy Terms | Separate vocabulary for tags |
| Featured Image | Media Field | Upload to media library |
Migrating from Contentful
API-Based Migration
Contentful's API-first approach makes migration straightforward using their Management API.
// migration-script.js
const contentful = require('contentful-management');
const axios = require('axios');
// Export from Contentful
const client = contentful.createClient({
accessToken: 'CONTENTFUL_MANAGEMENT_TOKEN'
});
async function exportContent() {
const space = await client.getSpace('SPACE_ID');
const entries = await space.getEntries();
// Transform to Drupal format
const drupalContent = entries.items.map(entry => ({
type: entry.sys.contentType.sys.id,
title: entry.fields.title?.['en-US'],
body: entry.fields.body?.['en-US'],
// Map other fields...
}));
// Import to decoupled.io via JSON:API
for (const content of drupalContent) {
await axios.post('https://your-site.decoupled.website/jsonapi/node/article', {
data: {
type: 'node--article',
attributes: content
}
});
}
}
Content Model Differences
Note: Contentful and Drupal have different approaches to content modeling. Plan your content types carefully.
- Map Contentful Content Types to Drupal Content Types
- Convert Rich Text fields to Drupal's text format
- Handle asset references and media fields
Migrating from Strapi
Database Export Approach
Since both Strapi and Drupal use relational databases, you can export data directly from Strapi's database.
Export Strapi Data
# Export from Strapi database
pg_dump strapi_db > strapi_export.sql
# Or use Strapi's API
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://your-strapi.com/api/articles?populate=*
Transform and Import
Create a transformation script to convert Strapi's data structure to Drupal's format, then use Drupal's migration tools or JSON:API to import.
Frontend Code Migration
API Endpoint Changes
Before (WordPress REST API)
// WordPress REST API
const response = await fetch('/wp-json/wp/v2/posts');
const posts = await response.json();
After (decoupled.io JSON:API)
// decoupled.io JSON:API
const response = await fetch('/jsonapi/node/article');
const data = await response.json();
const posts = data.data;
Migration Checklist
Content Migration
- Export all content and media
- Map content types and fields
- Import to decoupled.io
- Verify data integrity
Frontend Updates
- Update API endpoints
- Adapt data structures
- Test all functionality
- Update environment variables
Going Live
Launch Checklist
- Test Everything -- Thoroughly test all pages, forms, and functionality on staging
- Set Up Redirects -- Configure 301 redirects for changed URLs to maintain SEO
- Update DNS -- Point your domain to the new decoupled.io-powered site
- Monitor Performance -- Watch for any issues in the first 24-48 hours after launch
Need Migration Help?
Our team can assist with complex migrations. Contact support for a consultation.