Skip to content
Code on a screen with a dark theme
Roger Stringer2 min read

What happens to Gutenberg blocks, shortcodes and ACF fields

Gutenberg converts to Portable Text. Shortcodes and ACF are where you need to look closer. Here's what to expect from each.

Content import is the easy part of a WordPress migration. Content shape is the hard part. Here's how EmDash treats the three things that cause the most surprises.

Gutenberg and Classic content

Gutenberg markup is converted to Portable Text, EmDash's structured rich-text format. Classic Editor HTML goes through the same converter. Paragraphs, headings, lists, quotes, images and links come across the way you'd hope.

Complex blocks are another story. Inspect embeds, shortcodes, page-builder markup and plugin-defined blocks on the rendered EmDash site, one representative post at a time.

Reusable blocks (wp_block in a WXR file) are imported as sections, not as entries in a normal collection. Look for them under Sections in the admin.

Shortcodes

EmDash doesn't run PHP, so a shortcode like [gallery ids="12,14"] has nothing to expand it. Plan to replace these with Portable Text blocks or Astro components. Search your export for [ before you import so you know how many you're dealing with.

Custom fields and ACF

This is where the two import paths really differ.

With a WXR file, the analysis lists your non-internal post meta keys and suggests field names and types. But the import itself only writes the standard fields: title, content, excerpt and featured image. Treat that list as a to-do for a separate conversion.

With the EmDash Exporter, custom meta and Advanced Custom Fields values are copied when the target collection has matching fields. For an ACF field group with a "Post Type is equal to" rule, EmDash suggests a field for every ACF field in the group:

  • Text, number and true/false fields get matching types.
  • Select, checkbox, repeater, group and relationship fields become JSON fields.

JSON values keep their WordPress shape. A relationship field still points at WordPress post IDs, and image or gallery fields still point at WordPress media, not imported EmDash media. Your templates will need to resolve those, or you'll want a small migration script to remap them.

If an existing EmDash field has the same slug but a different type, that collection mapping is blocked. The importer never coerces a field to another type.

Re-running an import

The admin import skips entries that already exist, matched by collection, slug and locale. It does not match on WordPress ID. If a slug changed between attempts you'll get a duplicate to clean up by hand. Re-running the media step is cheap: byte-identical files are reused by hash.