How to migrate auto blog custom fields and metadata without breaking templates: Migrate the post meta, field keys, and template references together, not…
Last updated: November 30, 2026
Migrate the post meta, field keys, and template references together, not one at a time. If WordPress custom fields move without the same keys and data types your templates expect, the post still imports but the layout breaks, the wrong values show, or whole blocks disappear.
Key takeaways
- Keep the field key stable. The visible label can change, but the key is what templates and post meta read.
- Move custom fields, post metadata, and any template variables as one set, not as separate jobs.
- Advanced Custom Fields can look fine in the admin and still fail on the front end if the template expects a different key.
- The safest migration keeps the old field names, old value format, and old template calls aligned.
- If a field is missing, the template may not fail loudly; it may just print a blank slot or a default value.
What has to move with the post?
The fields that have to move are the WordPress custom fields, the post meta tied to each post, and any template variables that read those values. In WordPress terms, the data lives in post_meta, and templates usually pull it with functions such as get_post_meta() or, for Advanced Custom Fields, get_field().
That matters because the visible title and body are only part of the post. An auto blog often depends on extra values such as source URL, author name, external image URL, summary text, or a content flag that decides which template block appears. If those values do not arrive with the post, the template still loads, but the output changes.
A safe move keeps three things together: the field key, the field value, and the template call that expects it. A field can look correct in the WordPress editor and still fail on the front end if the template looks for source_url while the import created source-url, or if a text field became an array during import.
This is why migration work on auto blogs is different from a plain post export. A normal WordPress export can move posts and basic meta, but an auto blog often depends on exact naming. The WordPress Developer Resources pages for get_post_meta and update_post_meta show how strictly WordPress treats meta keys and stored values.
The clean rule is simple: if a template uses it, treat it as content, not decoration.
How do WordPress custom fields survive migration?
WordPress custom fields survive migration when the destination site receives the same key names and the same value shape that the old site used. That is the part that breaks most often, because labels, field groups, and imported values are easy to confuse.
A field label is what a person sees in the editor. A field key is what the database and template use. If the label changes from “Source URL” to “Origin Link,” the template can still work if the key stays source_url. If the key changes too, the template must be updated or the field must be remapped.
Advanced Custom Fields adds another layer. ACF can store the field value and field reference together, so a post may need both the visible value and the hidden reference row that tells ACF which field definition applies. If only one side moves, the editor can look half-correct: the value exists, but ACF may not format it the way the template expects.
The main trade-off is speed versus certainty. Renaming fields during import may feel tidy, but it creates hidden work later because every template line that calls the old key must be changed. Keeping the old key is dull, but it reduces template damage.
A practical way to think about it is this: the import is not finished when the posts appear in WordPress. It is finished when the same template tag on the destination site returns the same kind of value it returned before. A single string field is easy. A repeater, image array, or serialized value is not.
If the migration plan includes field cleanup, do it after the content lands and only after the template can still read the original key. Changing both at once is how a 2-minute import becomes a 2-day repair.
What is the safest migration checklist?
The safest checklist is to export the field map first, then import the content, then confirm the destination template still reads the same keys. The order matters because a broken template is usually a mapping problem, not a content problem.
- List every field the template reads. Use the exact meta key or ACF field name, not the display label.
- Note the value type for each field: text, number, URL, image array, repeater, or serialized data. One wrong type can make a field appear blank.
- Export the posts with their post meta, not just the post body. If the export tool lets you include custom fields, turn that on.
- Match the destination field keys to the source field keys before import. If the keys differ, write down the mapping instead of guessing later.
- Import a small batch first, such as 5 to 10 posts, so the template can be checked against known field values.
- Open one imported post in the editor and compare the field data with the source site. The goal is not just presence, but shape and key name.
- Load the front-end template and confirm each field prints where it should. A missing image, blank subtitle, or wrong source link usually points to a key mismatch, not a theme bug.
That process is slower than dragging everything into place, but it prevents the worst failure mode: content that looks imported while the template quietly reads nothing. The early batch is the time saver. It exposes a wrong field key before the full site depends on it.
The step that people skip most often is the value type check. A field that stores a plain URL on the old site may arrive as an array on the new site if the ACF setting differs. Templates that expect a string will not know what to do with an array, so the output fails even though the data is technically there.
Which template fields break most often?
The fields that break most often are the ones with exact key names, nested values, and template conditions. In WordPress and ACF, those include image fields, repeaters, relationship fields, and any meta key that a template uses in an if statement.
Here is the simple comparison that usually explains the failure:
| Field type | What the template expects | Common break after import | Safer move |
|---|---|---|---|
| Plain text | One string | Key renamed or empty value | Keep the original meta key |
| URL field | One valid link | Stored as text with the wrong format | Preserve the same field type |
| Image field | ID, URL, or array, depending on setup | Wrong return format after import | Match the source field setting |
| Repeater | Multiple rows | Rows import, but subfields shift | Keep the same subfield keys |
| Relationship field | Related post ID or object | Links point nowhere | Map IDs or relations carefully |

The key risk is that a template can still render when the data is wrong. It may fall back to a default image, hide a module, or print an empty wrapper. That makes the problem harder to spot than a total crash.
This is where field variables in the template matter. If the theme uses a direct meta call in one block and an ACF helper in another, the same field can appear to work in one place and fail in another. Mixed code paths create mixed results.
A good rule is to avoid changing field behavior during the migration. Do not switch a field from text to array, or from ACF-managed to plain post meta, in the same move that changes the site. Make one change at a time. That keeps the cause visible when something breaks.
For auto blogs, that discipline matters even more because many templates depend on imported metadata to decide what to show. A missing source field can remove a whole card, not just a small label.
What mistakes break templates fastest?
The mistakes that break templates fastest are renaming keys, importing only the post body, and changing field formats at the same time. Each one costs different work, but all three make the template read the wrong thing.
Renaming a key breaks the link between the database and the template. The data may still exist, but the code looks for a name that no longer exists. The fix is either to restore the original key or update every template reference to the new one.
Importing only the post body causes a quieter problem. The content appears, but the supporting fields are gone. That means missing source links, blank metadata blocks, and empty image spots. The fix is to include post meta in the migration plan, not as an afterthought.
Changing field format is the hardest mistake to unwind. A text field that becomes an array, or an ACF field that returns a different format, can break more than one template line. The fix is to keep source and destination field settings aligned until the migration is done and the template is stable.
One more trap is duplicate field keys across plugins or custom code. A key that looks harmless in the editor can still collide with another meta entry and make a template read the wrong value. That is why the field map matters more than the label list.
This page is part of the larger WordPress-to-WordPress blog migration guide for auto blogs, but the decision point here is narrow: keep custom fields and metadata identical enough that the destination template reads them the same way. That is the test that matters.
What custom field data needs to be preserved?
The field key, the stored value, and the value type all need to be preserved. If any one of those changes, the template may still load but show a blank area, a fallback, or the wrong content block.
For ACF fields, the hidden reference data matters too. A field can look present in the editor while still failing to format correctly on the front end if the reference rows did not move with it.
How do templates use custom fields after import?
Templates use custom fields as inputs for layout, labels, links, images, and conditional blocks. After import, the same template code looks for the same meta key or ACF field name and prints whatever value it finds.
If the key changed, the template usually does not warn about it. It simply returns nothing or a default value, which is why the page can look partly right and partly empty.
Can post meta break if field keys change?
Yes, post meta can break if field keys change, because the template may still point to the old key. The post data may exist under a new name, but the front end does not know that unless the code changes too.
The safest fix is to keep the original key names during migration. If a rename is unavoidable, update the template calls in the same change set so the code and the data still match.
Drafted with AI; not yet reviewed by a person.