Cybo Advanced Field EngineCyboweb Technologies · Documentation · v1.0.2

Sources: WordPress, CSV and JSON

WordPress posts and custom fields

Reads the posts of one post type (published, scheduled, draft, pending and private; never the trash). Each record is a post, so by default the migration writes the CAFE values onto that same post (Find existing objects by: the record itself, Only update existing).

Source field Holds
ID, post_title, post_content, post_excerpt, post_status, post_date, post_author, post_name, post_parent The post's own columns
_thumbnail_id The featured image ID
meta:{key} A custom field (post meta), for example meta:old_price. Serialized arrays are read as arrays; serialized objects are never created.
terms:{taxonomy} The post's term IDs

Custom fields are discovered from the newest 500 posts of the post type (at most 300 keys). WordPress's own keys (_edit_lock, _wp_old_slug …) and CAFE's markers are left out.

Typical use: an old theme stored prices as post meta:

Source Target Transformation
meta:old_price price (Number) Number
meta:on_sale on_sale (Toggle) Yes / no
meta:gallery_ids gallery Split text into a list → Media library item

The old meta is left as it is.

CSV files

  • The first row holds the column names. The separator (comma, semicolon or tab) is detected from that row; a UTF-8 byte order mark is removed.
  • Every value is text. Use transformations: Number, Yes / no, Date from another format, Split text into a list (for example garden|garage with separator |).
  • ID field: the column with a unique ID per row. It is remembered on the imported object, so a second run updates instead of duplicating. Without it, rows are numbered (1, 2, 3 …), then do not reorder the file between runs.

JSON files

A list of objects, or an object whose records, items or data member is that list:

{
	"records": [
		{
			"id": 12,
			"title": "Villa Sunset",
			"price": 450000,
			"team": [
				{ "name": "Anna", "role": "Agent" },
				{ "name": "Ben", "role": "Photographer" }
			]
		}
	]
}

A member that is a list of objects (team) can be mapped to a Collection, column by column. Numbers and booleans keep their type.

Files and size

Files are read by your browser and sent as text; the server never opens a file path. The text is stored with the migration (5 MB at most) so a long import can continue in later requests, and it is never sent back to the browser. For bigger files, import from WP-CLI with custom PHP or a custom source that reads the file in chunks.