Skip to content

Import and Export

JIX edited this page Jul 14, 2020 · 1 revision

Purpose

The administration interface of Ultimate Fields allows you to export and import containers (as well as Post Types and Taxonomies in Ultimate Post Types), which you have createted as both JSON files and PHP scripts.

You can access the Import / Export screen by clicking the Import / Export tab on the settings screen of Ultimate Fields.

import-export

You can import and export containers, created through the administration interface only. If you are using the PHP API, this article will be inapplicable to you.

JSON

JSON is a portable format, which Ultimate Fields can both generate and export, as well as read and import. This makes it suitable for situations when you'd like to back your fields up or migrate them to a different site without migrating the whole database.

If you are looking fot the JSON Synchronization article, please click here.

PHP

Containers, exported to PHP can be directly embedded within your theme/plugin. There are various benefits of doing so:

  1. No database calls are required to load containers, which brings a slight performance improvement.
  2. You can put your fields as PHP code into version control.
  3. You can specify a language textdomain when exporting the fields. This would allow you to localize them.
  4. Once fields have been exported to PHP, you may disable the administration interface of the plugin. This way users (incl. administrators) will be unable to change the fields, but they will still be loaded.

There is also a downside: Containers, exported to PHP can not be easily imported back to the database.

Clone this wiki locally