Skip to content
Ultivo Toolkit 1.0 is here! Get 10% off your first year with LAUNCH10 until September 30. See pricing
Documentation menu

Local JSON & deployment

Local JSON is part of the free version. Nothing to buy, nothing to switch on.

How sync works#

Every time a field group is saved, Ultivo Toolkit writes it as a JSON file to wp-content/uploads/ultivo-json/{group_key}.json: one file per group, named after its key. This happens automatically; there is nothing to enable. On the next page load the plugin reads that folder and registers the groups it finds as local groups, alongside whatever is in the database.

The plugin also reads {theme}/ultivo-json/, and never writes there. Plugins are not allowed to write into wp-content/themes, because a theme update replaces that folder and many hosts keep it read-only. To keep field groups in your theme, copy the JSON files across once and commit them; the plugin picks them up on the next load, with the uploads folder taking precedence when the same group key appears in both. If you would rather have the plugin write straight into the theme anyway, point the ultivo/json_dir filter at that path and it will.

If a JSON file is newer than the database record for the same key, Ultivo Toolkit shows a sync notice so you can pull the JSON version into the database with one click.

Version control#

Because field groups live as JSON files, they can travel with the rest of your codebase: commit them, diff them in a pull request, and review field changes the same way you review any other code change. A field added on staging shows up as a normal file addition; a renamed field shows up as a diff.

Deploying a site then means deploying code: the JSON files bring the field structure with them, no database export/import step required for the field groups themselves.

Import & export#

For one-off moves, use Ultivo Toolkit → Tools:

  • Export as JSON: download one or more field groups as .json files, to import on another install.
  • Export as PHP: generates the ultivo_add_local_field_group() array for a group, ready to paste into a plugin or theme's functions.php. This is the fastest way to get the exact array shape used by the PHP registration API.
  • Import: upload a .json export to add or update a group on the current site.

Import takes what you give it. Field names are never rewritten and nothing is rejected, because a name may appear literally in a theme (ultivo_get_field('card_1')) and renaming it on the way in would break that site without a trace. If an imported group contains two fields with the same name in the same place, the success message says how many groups that applies to; open the group and the builder shows you which fields collide. The same goes for migrating from ACF.