Instead of copying the code of custom fields and embedding it into a website, the export and import features we're going to talk about in this post will help you to do that without touching the code. This method has the same advantages: synchronizing custom fields between sites, easy back up, and saving the setup time. But, there is a difference. If you don’t know where to embed, edit, or save code as instructed in the previous post, this method can help you to do them all.
Perhaps you have heard about the export / import function of WordPress. It allows you to export / import posts, pages, comments, including custom fields. With the help of Meta Box Builder, now you can use it to transfer custom fields from one site to others.
Moreover, I also show another way to export / import custom fields using Meta Box Builder's tool.
Here we are to poke about these 2 following ways:
- Export / Import custom fields by the available functions of WordPress.
- Export / Import custom fields by Meta Box Builder.
Requirements:
- Installed and activated the Meta Box plugin in both 2 websites.
- Installed and activated the Meta Box Builder in both 2 websites.
- Created and set up field groups in Meta Box Builder.
Creating meta boxes and custom fields
As the necessary condition for exporting / importing custom fields, we obviously need to have at least one meta box with custom fields inside.
Go to Meta Box → Custom Fields and create a Field Group. Then add some custom fields. Don't forget to configure those custom fields.
In this example, we create a field group called product. We'll be exporting the configuration of this field group and importing it into other websites.
Let's get started!
Method 1: Export / import custom fields by the available function of WordPress
Step 1: Export all field groups and custom fields
Go to the admin dashboard of the original website, then choose Tools → Export menu. An interface with options as below will be displayed.
As usual, if you don't have Meta Box Builder, you can see only 4 options as Posts, Pages, Blocks, Media. With Meta Box Builder, one more option of "Field Groups" will be available.
Choose it, then press button Download Export File.
Save that file for the next step.
Pay attention that you have no more option out of exporting ALL the field groups. It’s quite inconvenient if you want to export only one or some field groups instead of all of them. If that's your case, please see the second way below.
Step 2: Import field groups and custom fields to another website
Go to the admin dashboard of the targeted website which you want to import custom fields, choose Tools → Import menu. You will see that:
Choose the file that you downloaded in step 1, then press Upload file and import. You might need to set the author for those field groups before pressing the Submit button to finish.
Go back to Meta Box → Custom Fields, you will see all the imported field groups as following:
Of course, the field groups and their custom fields operate well. To check that, create or edit a post, all custom fields will display the same as in the original website.
Video of the tutorial:
Method 2: Export / Import custom fields by Meta Box Builder
Step 1: Export field groups and custom fields
In the admin dashboard of the website which you want to export custom fields, go to Meta Box → Custom Fields.
You will see the list of field groups. Choose the field groups you want to export by checking the checkbox next to their titles. Then choose Export from the Bulk Actions dropdown. Then click Apply.
The file contains data of field groups will be export and download automatically.
Step 2: Import field groups and custom fields to another website
In the admin dashboard of the website which you want to import custom fields, go to Meta Box → Import. The displayed interface after that is quite similar to the last one of using the export / import function of WordPress.
Choose the downloaded file in the previous step, then press Upload file and import. That’s all!
Then go back to the management interface of custom fields of Meta Box Builder, the imported field groups are showed. You also see the above custom fields displayed on the page of edit post are similar to the original website. It obviously is similar to the ones of method 1.
Video of the tutorial:
Differences between export / import custom fields in two above ways
WordPress | Meta Box Builder |
Always export and import all field groups | Be able to choose fields groups to export and import |
Conclusion
The above ways (and the one in the previous post) actually is cloning custom fields from one site to others. They are the easiest methods to do that, for sure. However, each of them has own advantages, disadvantages, and conditions. Base on that, you may choose the one are most suitable for your need and resource. Happy making custom fields!
Besides, you also can use WP All Import & WP All Export to import/export custom fields for more choice.
- How to Export and Import Custom Fields with Meta Box Builder?
- How to Add and Configure Custom Fields Using Meta Box Builder
- How to Easily Copy Custom Fields From Sites to Sites with Meta Box Builder