株式会社オブライト
Web Development2026-04-02

WordPress to EmDash Migration Guide - Practical Steps from WXR Import to Astro Theme Conversion

Complete guide to migrating from WordPress to EmDash. Covers WXR export, EmDash Exporter plugin, custom post type conversion, media migration, and Astro theme adaptation with practical steps.


Background of WordPress Migration - Solving Security and Performance Challenges

WordPress powers over 43% of websites globally, but security vulnerabilities, plugin dependencies, and performance issues have been long-standing challenges. In 2026, Cloudflare released EmDash as the "spiritual successor to WordPress," offering security through Astro 6.0-based serverless architecture and v8 isolate sandboxing. Migrating existing WordPress sites to EmDash reduces server management burden, accelerates performance via Cloudflare Workers' global edge network, and optimizes costs with CPU-time-only billing. This article provides practical guidance on migrating from WordPress to EmDash.

Step 1: Export WXR File from WordPress

The first migration step is generating a WXR (WordPress eXtended RSS) file using WordPress's standard export feature. In the WordPress admin panel, select "Tools" → "Export," choose "All content," and export. The WXR file contains posts, pages, custom post types, comments, categories, tags, and custom field metadata. However, WXR does not include media file bodies (images, videos), which must be downloaded separately. For large sites (1000+ articles), using plugins like WP All Export for split exports is recommended.

Step 2: Optimized Export with EmDash Exporter Plugin

Cloudflare officially provides the "EmDash Exporter" WordPress plugin, which generates more optimized migration data. EmDash Exporter outputs shortcode conversion maps, theme settings (widgets, menu structures), and custom field schema definitions in JSON format, in addition to standard WXR. Install "EmDash Exporter" from the WordPress plugin directory and configure export settings under "Settings" → "EmDash Export." Particularly, pre-defining field mapping for custom post types automates schema configuration on the EmDash side. After export completion, two files are downloaded: the WXR file and a JSON configuration file.

Step 3: Execute WXR Import to EmDash

Launch the EmDash local environment with npm create emdash@latest and log into the admin panel with passkey authentication. From the "Import" menu, select "WordPress WXR" and upload the previously exported WXR and JSON configuration files. EmDash parses the WXR and displays a mapping preview of post types, categories, tags, and custom fields. Here, map WordPress custom post types (e.g., portfolio) to EmDash collection names, and associate custom fields (e.g., ACF) with EmDash schema fields. After confirming settings, execute the import, and article data is saved to Cloudflare R2 (object storage).

Step 4: Convert Custom Post Types and Fields

WordPress custom post types (CPT) and custom fields like Advanced Custom Fields (ACF) must be converted to EmDash collection schemas. Using EmDash CLI, define schemas with the emdash schema define command. For example, WordPress's portfolio CPT is defined in EmDash as { "name": "portfolio", "fields": [{ "name": "client", "type": "string" }, { "name": "projectDate", "type": "date" }] }. Field types map WordPress's text, textarea, image, date to EmDash's string, text, media, date. Complex relationships (inter-post relations) are reproduced with EmDash's reference field type. After schema definition, imported article data is automatically applied to the new schema.

Step 5: Media File Migration and Cloudflare R2 Upload

Since WXR files do not include media file bodies, manually download images and videos from WordPress's wp-content/uploads directory. After downloading, use EmDash CLI's emdash media upload ./uploads command to bulk-upload the local uploads folder to Cloudflare R2. During upload, EmDash automatically converts image URLs to Cloudflare Images URLs (e.g., https://imagedelivery.net/[account]/[id]/public) and replaces old WordPress media URLs in article bodies with new URLs. For large files (10GB+), parallel uploads using Cloudflare Wrangler's wrangler r2 object put command can save time. After upload completion, verify that images display correctly in EmDash articles.

Step 6: Convert WordPress Theme to Astro 6.0 Theme

EmDash's theme system is based on Astro 6.0, and WordPress PHP themes cannot be used directly. EmDash provides WordPress theme migration guidance via "Agent Skills," where AI agents analyze PHP templates (header.php, single.php, archive.php, etc.) and generate corresponding Astro components (Header.astro, SinglePost.astro, Archive.astro, etc.). For example, WordPress's the_title() converts to {post.title} in Astro, and get_permalink() to {post.slug}. Stylesheets (style.css) can be transplanted directly to Astro projects, but jQuery-dependent JavaScript must be rewritten as Astro client-side scripts (<script> tags) or React/Vue/Svelte components. After conversion, place the theme in EmDash's themes directory and select it in settings.

Migration Checklist - Verification Items for Complete Migration

Before completing migration, verify the following checklist: 1) Are all posts and pages correctly imported (compare article counts)? 2) Is category and tag hierarchy preserved? 3) Is custom field data correctly mapped to the new schema? 4) Are all media files uploaded and displayed in articles? 5) Do internal links (inter-article links) function correctly? 6) If comment functionality is needed, is it migrated to EmDash's comment system or external services (Disqus, Commento)? 7) Are SEO settings (meta tags, OGP) implemented in the Astro theme? 8) Can performance improvements be confirmed through tests (Lighthouse, WebPageTest)? After verifying these items, deploy to production.

Oflight's Migration Support Services

Oflight Inc. provides comprehensive support for WordPress to EmDash migration. We offer one-stop services including WXR export optimization for large sites (1000+ articles), complex custom post type schema design, EmDash Exporter configuration customization, bulk media file migration, WordPress theme to Astro conversion, performance tuning, and production deployment. Through Oflight's Web Development Service (https://oflight.co.jp/services/web-development), we also support post-migration operational stabilization, custom plugin development, and content automation via AI integration. Companies facing challenges with WordPress operational costs and security risks are encouraged to consult with us. Realize next-generation serverless CMS operations through EmDash migration.

Feel free to contact us

Contact Us