Smackcoders
0
0

How to Export and Import Advanced Custom Fields

Recognizing the pivotal role of website development is imperative. WordPress, powering nearly 60 million websites, serves as a cornerstone for businesses. As these websites evolve, the need for managing extensive content, including posts, pages, and custom fields, becomes paramount. Creating your custom fields for custom data management in your WordPress website is made easy with the Advanced Custom Field plugin.

Creating custom fields with ACF for managing unique data in WordPress is a seamless process, offering flexibility and efficiency. However, the real challenge arises when businesses aim to populate these advanced custom fields with relevant content. To streamline this complex data entry process, we have developed the WordPress CSV/XML Importer plugin.

This plugin, integrated with the WP Ultimate CSV/XML Importer, simplifies the import and export of custom field data in WordPress. Whether it’s posts, pages, custom posts, users, or WooCommerce products, this solution facilitates a smoother data transfer process. Additionally, businesses can automate imports through scheduled functions, ensuring efficiency and accuracy.

The WordPress Ultimate CSV/XML Importer and Exporter plugin supports the import, update, and export of ACF Fields data for posts or pages. Its versatility extends to WooCommerce products, users, custom taxonomies, or custom posts. Both the free and pro versions of the ACF plugin are seamlessly integrated, providing users with comprehensive features.

Even when dealing with complex field types like Group field type, Repeater fields, and Google Map field data, the WordPress CSV Importer and Exporter plugin excels. This tool ensures that businesses can manage and update intricate data structures with ease, contributing to a more efficient and organized WordPress website.

ACF Field Types Explained

Text Field

Single-line content comes under the text field. For example, the WP Ultimate CSV importer

Text Area Field

You can add paragraph content in the text area field. Example: WordPress Ultimate CSV Importer is an import tool that allows you to import CSV/XML data into the WordPress website. You can either import new data or update existing data in your WordPress website.

Number Field

Any numeric data can be added in this field. An example of a number field is 0123456789

Range Field

You can upload any range of values Ranging from 0 to 100.

For example, 99

Email Field

Use the standard email format. It should have @ and dot(.). For example [email protected]

URL Field

Upload specific links to a page, content, product or URL’s. Example is https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html

Password

You can put any text values in the password. A password may be numeric, alphabetic, or include special characters. An example of the password field is TEST70#8

Wysiwyg Editor

Any type of text value is supported in the Wysiwyg editor field. For example, you have to provide it in CSV format as 

WP Ultimate CSV Importer

  • Import/ Update
  • Instant/ Scheduled import

Image

In the image field, you have to add the URL of the external image or the WP media gallery image. An example of an image field is https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp

File

Specify the file path in your WordPress Media gallery. External URLs are not supported.
For ex:
https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp

oEmbed

This field accepts or mentions the YouTube video URL.

Example https://www.youtube.com/watch?v=6tdiOjw4EDk

Gallery Fields

You can import your photos or gallery field images from the WordPress media library or the external image URL. You can specify the URL in comma(,) separation for multiple URLs in your CSV with the field name as the header to automap the field. For the image in the media library, you can also specify the media ID.

Example
https://cdn.smackcoders.com/wp-content/uploads/2023/11/software-developments-services.webp

Select

Provide the values of your selected option to select the desired one. Multiple values are selected by using Comma(,) separation. For Example:

  • Custom Field
  • Premium
  • WPML importer

Checkbox

Provide the checkbox values in your CSV file. To enable multiple checkboxes to provide the values in Comma(,) separation. An example

  • Custom Field Importer
  • Premium
  • WPML importer

In CSV Format:
Custom Field Importer, Premium

WP Ultimate CSV Importer Pro

Get Ultimate CSV/XML Importer to import data on WordPress faster, quicker, and safer.

Radio Button

Specify the radio button value to be selected. For an illustration

  • Custom Field Importer
  • Premium
  • WPML importer

In CSV Format:

Premium

Button Group

Specify the button value to be selected. For example

  • Custom Field Importer
  • Premium
  • WPML importer

In the CSV file value will be like this:

Premium

True/ False

Specify the desired value. For example

  • if it is True- 1
  • if it is false- 2

but in CSV Format you have to provide as

Link

Specify your Post or Page or any external link. In the CSV file provide the link as

Page Link

Specify your WordPress page URL. Mention multiple pages using a Comma(,) separator. In the CSV file provide the page link as:

Post Object

Specify the Post ID. Multiple values are separated in Comma(,) separation.

  • Custom Field Importer
  • Premium
  • WPML importer

To add a post object, mention their ID in the CSV file as
1,2,3

Taxonomy Field

ACF WordPress taxonomy field can be created and assigned with the taxonomy values in comma(,) or pipeline(|) separation. If the value of the taxonomy doesn’t exist then the new taxonomy is created and assigned to the Post or Page.
CSV Format: To add tags CSV importer, Ultimate CSV importer provide values as csv importer, Ultimate CSV importer

Relationship Field

Linking multiple Pages or Posts with advanced linking to another Post type can be done by relating to multiple post object data. You can mention the related Post or Page ID in comma(,) separation with the field name as the header in your CSV file to relate the CSV file with the created ACF field automatically. For example,

  • Custom Field Importer
  • Premium
  • WPML importer

CSV Format: To relate Custom field importer and premium mention value as 1,2

Repeater Field

Repeating a section with the same set of subfields in ACF repeater fields can be automated to insert the data in each field type. Mention the value in comma(,) separation or pipeline(|) separation if the inserted field type has multiple values.
For eg, if one of the field types is a checkbox and the field name is color, you can have the header as color to automap and the value as blue, black, red, or blue|black|red

User

Mention your User ID. To assign multiple users to mention the ID in Comma(,) separation.

CSV Format:

To select 101, 110, and 201. Provide values as
101, 110, 201

Google Map

Specify your exact geo-location with Geo Codes.

CSV Format:

Smackcoders Inc., Kattnayakan, Palayamkottai, Tirunelveli, Tamil Nadu, India|8.7149916|77.73236250000002.

Date Picker

Mention the date value in the standard format. DD/MM/YYYY

CSV Format:
29/12/2020

Date Time Picker

Specify the date(DD/MM/YYYY) and time(HH/MM/SS).

CSV Format:

29/12/2020 and 01:10:00

Color Picker

Mention your colors in the Hex code.
CSV Format: #ffffff

Install WP ultimate CSV Importer

  • Purchase the WP Ultimate CSV importer plugin from Smackcoders.
  • In your WordPress website, click on the Plugin menu on the right side.
  • Add new→ Upload the plugin from the desktop→ Install and activate the plugin.

Simple Export/Import of Advanced Custom Fields data from CSV in WordPress: ACF Export Import

Importing your ACF field data into WordPress is simple and the same as importing posts usually using CSV Importer. The first thing you need to do is to install and activate the WP Ultimate CSV Importer plugin. Let’s take a look at the import and export of CSV files in WordPress using WP Ultimate CSV Importer.

CSV Preparation

Upon activation, you can simply go to ‘WP Ultimate CSV Importer → Import/Update’. Now you will be prompted to upload your CSV file containing ACF field info in UTF-8 file format.

The WP Ultimate CSV Importer fetches ACF field info based on the columns in your spreadsheet. The first row must have the column names, and you can have the name of your choice and there is no restriction in naming the ACF fields.

You can download the sample ACF CSV file for your reference. And you can open it in Microsoft Office, LibreOffice Calc, or Google Docs. While downloading the CSV file, make sure you use the comma(,) to separate columns and the text delimiter is set to double quotes(“).

Import ACF Fields in WordPress from CSV

Before importing your CSV file you have to create a custom post type in the ACF plugin. In the ACF dashboard, click on Create New where you have to create a custom template based on your needs in ACF. You have to assign the template for the post, page, or any other field. This allows ACF to get mapped with WP header fields.

getting started acf fields 2

Now you can import the CSV file by following 4 simple steps, import or update the existing content on your WordPress website.

Step 1: Uploading the CSV file

Upload your CSV in any of these 4 methods:

  • A Upload from Desktop
  • Upload from FTP / SFTP
  • Upload from URL
  • Choose File in the Server.

wp ultimate csv importer upload csv 1 1 8

Then choose ‘New Items’ whether the CSV file contains new items to import or ‘Existing Items’ to update the website content.

acf import wp ultimate csv importer 1

Step 2: Mapping the Header fields

Relate the CSV headers with WordPress fields. You can use the ‘Advanced Mode’ with dropdown or simply use the ‘Drag & Drop’ mode to match the CSV headers with WordPress fields.

wp ultimate csv importer acf fields mapping

Once you map the fields, give a name in the ‘Save this mapping as’ field to use this mapping as a template later. Then proceed to next with Continue. Skip the Featured media handling section if you don’t upload any images.

Know More: Documentation for CSV importer

save mapping wp ultimate csv importer 4

Step 3: Importing the CSV file

Now import the content to WordPress. To commit safe importing, check the ‘Enable safe prostate Rollback(Backup before import)’ to get a backup before you import and it also rolls back to the previous edition if an unexpected problem arises while importing.

Enable ‘Do you want to SWITCH ON Maintenance mode while importing?’ to notify your website visitors that the website is under maintenance. You also check for duplicates while you import using the option ‘Do you want to handle the duplicate on existing records?’ and choose the WordPress fields to check duplicates for those fields.

Now choose the ‘Import’ button to instant import the content on your WordPress website or schedule the post to get an update in the future, that is, to update content on the website at the specified date and time. The custom field ACF info will update successfully in WordPress from CSV.

wp ultimate csv importer import acf fields information 7

Export ACF Fields in WordPress as CSV

This section deals with the WordPress export posts with ACF fields. In just two straightforward steps, you can export WordPress ACF fields alongside Post, Page, or Custom Post content into a CSV file, ensuring a secure backup or facilitating migration. In Step One, select the Post Type, and in the second step, provide the export file name and choose ‘CSV’ as the export type.

The ‘Split the Record’ field mentions the records number to export one by one, if you give 100, the first 100 records will be exported in the first CSV and the next hundred records exported in the second CSV file, and so on.

You can export records with advanced filters like ‘Export with auto delimiters’, ‘Export data for the specific period’, ‘Export with specific status’, ‘Export data by specific author’, and ‘Export data based on specific inclusions’, this lets you export data with specific fields.

wp ultimate csv importer export data as csv

ACF export field groups

If you’re using Advanced Custom Fields (ACF-WP) in WordPress and you want to export ACF field groups for backup or migration purposes, ACF provides a built-in export feature. Here are the steps to export ACF field groups:

  1. In your WordPress Dashboard:
    • Go to WP->”Custom Fields” > “Field Groups.”
  2. Select Field Groups:
    • In the Field Groups screen, you’ll see a list of all your ACF field groups.
  3. Export Options:
    • Navigate to Tools at the top of the menu and select the field groups you want to export.
    • Now click on the Export file.

Now, you have an XML file that contains the exported ACF field groups. You can use this file for backup purposes or for importing these field groups into another WordPress installation.

If you need to import these field groups into another WordPress site, you can follow these steps:

  1. In your WordPress Dashboard on the target site:
    • Go to “Custom Fields” > “Field Groups.”
  2. Import Field Groups:
    • Navigate to tools. And browse the ACF files you would like to import. Then Click on the “Import File” option.

ACF will then import the field groups, and you should see them listed in the Field Groups screen.

This process makes it easy to move your ACF configurations between WordPress installations or to create backups of your ACF settings. Always ensure that both sites have the same version of ACF or compatible versions to avoid compatibility issues during import.

Frequently Asked Questions (FAQ)

What is Advanced Custom Fields?

Advanced Custom Fields (ACF) is a WordPress plugin that allows users to add custom fields to their content types, such as posts, pages, custom post types, and more. It provides a flexible interface for creating and managing custom fields, making it easier to customize WordPress websites to specific needs without writing any code.

How do I enable Advanced Custom Fields Pro?

To enable Advanced Custom Fields Pro, purchase a license for the pro version from the ACF website. Once purchased, you’ll receive a license key which you can use to activate the pro features within the ACF settings in your WordPress admin dashboard.

Where are Advanced Custom Fields stored in the database?

The ACF data is stored in the wp_postmeta table of the WordPress database. Each custom field is stored as a separate meta entry associated with the corresponding post or page.

How to export WooCommerce Products with ACF?

The WP CSV importer plugin has a few simple steps to export WooCommerce Products along with the ACF if you assign the desired custom fields with its appropriate Woocoommerce Product. Exporting Advanced Custom Fields (ACF) data alongside WooCommerce product information can provide valuable insights and streamline data management processes. Here’s a step-by-step instruction on how to achieve this:

Step 1: Navigate to the WP CSV importer plugin
Step 2: Click on the Export option and select the content type as WooCommerce Products
Step 3: Provide the File name and file type
Step 4: You can also export data with the advanced filter option

Step 5: Click on Export

By following these steps, you can seamlessly export WooCommerce product data along with associated Advanced Custom Fields, empowering you to analyze, manage, and utilize your data more effectively.

How to Update Advanced Custom Fields in Bulk?

The WP CSV importer allows you to import/update / Export your CSV files in WordPress. 

Steps to update ACF in Bulk:

Step 1: Update all the Advanced custom fields in the CSV files
Step 2: Log in to WordPress and navigate to WP Ultimate CSV Importer Pro.

Step 3: Select the Import/Update option

Step 4: Browse the CSV files and select the content type for which you have updated the ACF (for example, posts, pages, Woocommerce Products, etc.,)

Step 5: Enable  the Existing option to update your acf in the selected post types.

Step 6: Follow the onscreen instruction and Click on Import to import the updated changes.

Can I export ACF fields on their own?

Yes, you can easily export the advanced custom fields of posts, pages, WooCommerce products, etc. with WP CSV importer.  The export process is the same as that explained above. Follow the three steps above. And finally, select the advanced filter option.

In the Advanced Filter option, select all the advanced custom fields in the ACF fields PRO section.

Once done click on export. Now all the ACF of the selected content type will be exported successfully.

How do I show Advanced Custom Fields in WordPress?

  1. Display custom field using Theme files

To display Advanced Custom Fields in WordPress, you typically use PHP code within your theme files or in the content editor. ACF provides functions like get_field() or the_field() to retrieve and display the values of custom fields.

<?php

$custom_field_value = get_field(‘your_custom_field_name’);

if ($custom_field_value) {

    echo $custom_field_value;

}

?>

Replace ‘your_custom_field_name’ with your custom field name.

2.Display custom fields using short codes

If you prefer not to edit theme files directly, you can also use shortcodes provided by the ACF plugin to display custom fields within your posts or pages. Shortcodes make it easy to insert custom field values directly into your content.

By following these steps, you can effectively show advanced custom fields in WordPress and enhance the functionality and customization of your website.

What can you do with Advanced Custom Fields?

With Advanced Custom Fields, you can add custom fields to various content types in WordPress, including posts, pages, custom post types, taxonomies, and user profiles. You can create fields such as text inputs, checkboxes, select dropdowns, images, file uploads, and more to tailor your content editing experience and output.

How do I export Advanced Custom Fields?

You can export Advanced Custom Fields settings and field groups using the built-in export feature in the ACF settings page within the WordPress admin dashboard. Also, you easily export the ACF with WP CSV Importer. This generates a JSON file containing all your custom field configurations which you can then import into another WordPress installation.

Is there a free version of Advanced Custom Fields?

Yes, there is a free version of Advanced Custom Fields available in the WordPress plugin repository. However, the free version has limited features compared to the Pro version.

How do I get a repeater in ACF?

To use the repeater field in ACF, you must create a field group and add a repeater field. You can then define the subfields that will be repeated within the repeater.

What is the layout of the repeater field in ACF?

The layout of the repeater field in ACF is a set of subfields that can be repeated multiple times. Each instance of the repeater field allows users to input values for the defined subfields, and these values are stored as arrays in the database.

How do I create a repeater field in WordPress?

To create a repeater field in WordPress using ACF, you first need to create a field group in the ACF settings and then add a repeater field within that group. Configure the repeater field by adding subfields that you want to repeat, and then assign the field group to the desired location, such as a post type or page template.

What is the repeater field limit in ACF?

The repeater field limit in ACF depends on the server resources and the maximum input variables allowed in your PHP configuration. By default, there isn’t a strict limit imposed by ACF itself, but performance may degrade if you have an excessive number of repeater rows due to database queries and memory usage.

End Notes

WP Ultimate CSV Importer supports the ACF plugin. You can import or export more than 1000 custom fields, posts, and pages using CSV Importer Free or CSV Importer Pro version

For more detailed information check the WP Ultimate CSV importer documentation to import/update/schedule or export the ACF fields data. Contact us for any help and also please share your feedback with us without any hesitation.