Skip to main content

Export/Import custom fields

Instead of using code to embed custom fields from one site to others, we could use another method supported by Meta Box Builder. This extension allows you to export/import custom fields fast and easily.

info
  • This method allows you to choose exporting/importing any field group individually;
  • This method allows you to export/import only the field settings, excluding the data that is stored in the fields.

Video Version

Preparation

We need to have the Meta Box plugin and Meta Box Builder on both websites, the original site and targeted one.

You can freely download and activate the Meta Box plugin from wordpress.org.

You can install Meta Box Builder individually or find it in the Meta Box AIO. This extension provides a UI to create custom fields and the export and import features.

After activating two plugins, you’ll see a new Meta Box menu as below:

Meta Box dashboard menu

Creating custom fields

On the original site, let’s create some fields. We have a tutorial on creating custom fields with Meta Box Builder, please take a look for more detail here.

Here we’ll create a field group named Author and export/import its settings to other sites for example.

Created field group

Exporting field groups and custom fields

To export the custom fields from the original site, go to Meta Box > Custom Fields. Then, a list of field groups will appear. Choose the ones you want to export by ticking the checkbox.

Next, there are two ways to export the field groups.

If you choose one field group, simply click on its Export option like this:

Click on Export option

In case you export several field groups, press the Bulk actions dropdown, then select the Export option and Apply.

To choose several field groups, press the Bulk actions

After that, the file that contains the data of the selected field groups will be downloaded automatically.

Importing field groups and custom fields

In the dashboard of the targeted website you want to import the field group, go to Meta Box > Custom Fields > Import.

Then click on Choose File and select the downloaded file to import the field group.

Click on Choose File and select downloaded file

Then go back to the field groups list in the Custom Fields menu on the targeted site, and you’ll see the imported field group is displayed as follows:

Imported field group is displayed

To check whether the field group works well, you might create/edit a page or post where the custom fields are located, the fields will display similar to the original website.

Edit or created a page to check whether the field group works well