How to Import Advanced Custom Fields (ACF)

WP All Import and the ACF Import Add-On allow you to import data to any Advanced Custom Fields (ACF) added to your post type or custom post type.

The ACF plugin extends WordPress's basic functionality to enable more complex fields, different layouts, and settings. Using our integration with this plugin, you can avoid adding that data manually and just import everything.

Importing Advanced Custom Fields with WP All Import and the ACF Import Add-On is as easy as importing normal custom fields.

Here’s how it works:

  1. Create your field group and add all of your fields via the ACF plugin.
  2. Make sure WP All Import and our ACF Add-On are active.
  3. Go to All Import › New Import and start a new import of the post type where you added Advanced Custom Fields.
  4. In Step 3, you'll see the Advanced Custom Fields Add-On section to import the previously added fields:
Advanced Custom Fields Example

Continue reading below to see step-by-step instructions on how to import Advanced Custom Fields using the ACF Import Add-On and WP All Import Pro.

Step 1: Create a New Import for Advanced Custom Fields

Navigate to All Import › New Import and provide a valid import file. Then, choose from the drop-down list the post type that has the Advanced Custom Fields attached.

In this example, we're importing ACF fields to Posts.

Import Advanced Custom Fields New Import

Click Continue to Step 2 to move on to the next step.

Keep in mind that your Advanced Custom Fields and Fields Groups need to be previously created and defined for posts in the ACF plugin.

If you're not certain how to create the field groups, please review How to Create ACF Fields Groups in the Advanced Topics section below.

Step 2: Review Import Data 

Now the Review Import File interface appears. Here you can review and confirm that the import data looks correct:

Import Advanced Custom Fields Review Import File

The import has detected 100 records to import. To make sure that the data is correct, you can review each record with the gray arrows at the top.

In this step, you can Add Filtering Options if they are needed.

This example uses a CSV spreadsheet. If you import an XML or Excel file, you can decide which will be the main node to import.

Once you confirm that the data looks good, click Continue to Step 3.

Step 3: Map Incoming Data Elements to their Correct Advanced Custom Field

The Drag & Drop interface appears here. It allows you to map the data elements to their respective target fields.

To map the data, locate the desired import element in the panel on the right, then drag that element to its corresponding field on the left.

Import Advanced Custom Fields Drag and Drop

The Advanced Custom Fields Add-On section is where you define the ACF fields to import.

Locate that section by scrolling down and then enable the field group to import:

Import Advanced Custom Fields Enable Group

You can map each individual Advanced Custom Field as required:

Import Advanced Custom Fields Map ACF Fields

Once all of the relevant data elements are mapped to their target fields, click on Continue to Step 4 at the bottom to move to the next step.

Before proceeding, make sure that you map all other fields related to the post type or custom post type that you're importing.

Step 4: Configure Remaining Settings and Run Import

The Import Settings interface is where you configure the remaining import settings and other options:

Import Advanced Custom Fields Import Settings

Specifically, you need to define a Unique Identifier for the import. WP All Import uses the unique identifier to keep track of imported records. To create it, simply click on Auto-detect.

You can also define this unique identifier by manually dragging and dropping fields from the right.

Here you can modify the import behavior whenever it's run again (to update, delete, or create new records found on the import file). You can set up Scheduling Options and Configure Advanced Settings. With most imports, there's no need to modify any of these settings.

Click the blue Continue button at the end to move to the next step.

Step 5: Verify Imported Data and that the Advanced Custom Fields Were Created Correctly

Next, you see the Confirm & Run interface. In the Import Summary section, you can review the import, what's the import file, and other import settings.

Import Advanced Custom Fields Confirm and Run Import

Click the green Confirm & Run Import button to execute and run this import.

When it completes, you will see the Import Complete screen:

Import Complete

That's it! The import correctly processed the posts and ACF fields from this example.

You can review the imported fields by checking any of the imported posts in Posts › All Posts.

Import Advanced Custom Fields Advanced Topics

How to Create ACF Field Groups

Every Advanced Custom Field that exists on your site is part of a Field Group. A Field Group is the method used by the ACF plugin to attach fields to post types or custom post types. Each field group has a title, fields, location rules, and visual settings.

Here's what you need to do to add field groups:

  1. Go to Custom Fields › Field Groups.
  2. Click on Add New at the top.
  3. Input a title for the field group
  4. Add the desired Advanced Custom Fields by using the + Add Field button.
  5. Define where these fields will show by setting a Location.
  6. Click Publish to create the new field group.

Import to Repeater Advanced Custom Fields

The ACF Import Add-On offers three different ways to import ACF repeater data:

  • Fixed Repeater Mode: used when each piece of the repeating data is stored in separated columns or elements.
  • Variable Repeater Mode (XML): used when each piece of the repeating data is stored in XML format as a sibling element.
  • Variable Repeater Mode (CSV): used when each piece of data is stored in different columns but with multiple data entries that are also separated by a character.

The mode used to import your ACF repeater data will depend on the format provided by your import file.

The ACF Import Add-On was built taking into account that each dataset is different. This allows you full control over your ACF import and enables support for multiple file formats.

To learn more about the different modes available, you can see our in-depth guide on importing Repeater Fields.

How to Import Advanced Custom Fields on Their Own

Unfortunately, this isn't possible since the actual Advanced Custom Fields are attached to a post type or custom post type on your site.

This means that, as explained in this guide, you need to import data into the specific post type or custom post type where the fields are attached.

WP All Import and the ACF Import Add-On can import data to the fields, but they cannot import the actual fields (in other words, it's not possible to create the fields while importing).

To import (or export) the ACF Field Groups themselves, use the options found in Custom Fields › Tools.

Frequently Asked Questions

How Do I Export Advanced Custom Fields?

You can export Advanced Custom Fields using WP All Export and the ACF Export Add-On. Here's what to do:

  1. Navigate to All Export › New Export and select the post type with attached Advanced Custom Fields.
  2. Add the desired ACF fields that you want to export.
  3. Generate the export file and download it.

To learn more, please see How to Export Advanced Custom Fields (ACF).

How Do I Add a Custom Field in ACF?

You can add an Advanced Custom Field to an existing field group like so:

  1. Locate the field group where you want to add this custom field in Custom Fields › Field Groups.
  2. Click on Edit.
  3. Here you can add the new Advanced Custom Field to this field group by clicking on + Add Field and configuring the new field.
  4. Once done, click on Update to save the changes.

How Do I Add Advanced Custom Fields in WordPress Programmatically?

While you can use ACF functions to import Advanced Custom Fields programmatically, we recommend using WP All Import and the ACF Import Add-On, as explained in this article.

When importing, you can use the pmxi_acf_custom_field filter from our Action Reference. That filter allows the modification of the Advanced Custom Field values.

Related Docs

Learn more about how to export Advanced Custom Fields with WP All Export.

Learn how to import correctly into ACF repeater fields.

Execute PHP or custom code to modify ACF data during import.

Lifetime support. Lifetime updates. Pay once.

Packages
Standalone
Import
Pro Package
$249
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Pro Package
$299
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
WooCommerce Import Package
$149
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Standalone
$169
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Export Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
cross