In this WordPress tutorial, we will show you how to export and import Advanced Custom Fields data, using CSV files. Exporting and importing ACF data is useful for CSV backups, editing Excel custom fields, bulk update Advanced custom fields when importing from CSV to WordPress, and any other use you can think of.
Related tutorials:
- Bulk edit ACF data on posts, pages and custom post types
- Bulk edit ACF data on WooCommerce products
- Export and import ACF data with Google Sheets
This is what you need to export/import Advanced Custom Fields using CSV files:
1- Advanced Custom Fields
This plugin allows you to add custom fields for your WordPress posts, pages and custom post types, including WooCommerce products.
Click here to download the free version of ACF.
2- WP Sheet Editor – Post Types
This plugin allows you to view and manage WordPress posts, pages and custom post types in a spreadsheet.
It allows advanced searches, quick duplicates, bulk edits, export and import.
You can download the plugin here:
Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features
Notes:
- This tutorial assumes you have already added custom fields to your WordPress posts, pages, or custom post types.
- This method works with WooCommerce products as well.
In this example, we will use the WordPress posts spreadsheet, so we need to go to WP Sheet Editor → Edit posts.
If you scroll to the right in the spreadsheet, you will see that it displays the fields added with the Advanced Custom Fields plugin.
How to export Advanced Custom Fields to a CSV
Let’s see how to export Advanced Custom Fields (ACF) data from WordPress to a CSV file.
We need to start by opening the Export tool.
Next, we need to select these values:
- Select the columns/fields you want to export: You can select all active columns, all columns, or specific columns by typing the column names. Make sure you include the ACF columns here.
- Select the rows/posts you want to export: You can export all rows, all rows from a specific search, or all rows that you have manually selected in the spreadsheet.
- Select the app you will use to open/edit the CSV file: In this example, we will select the Microsoft Excel (Office 365) app.
- Click on Start new export.
After you do that, a CSV file containing the data will be downloaded to your computer.
As you can see in this screenshot, we have exported our Advanced Custom Fields data to a CSV file.
You can save the ACF data in a CSV as a backup, edit the data of your Advanced Custom Fields in Excel, etc.
How to import Advanced Custom Fields from a CSV
Let’s see how to import Advanced Custom Fields data from a CSV into WordPress.
The first thing you need to do is to prepare the CSV you want to import.
Make sure that your CSV contains the columns corresponding to your ACF fields.
Once we have our CSV ready to import, we need to start by opening the Import tool.
Second, you need to select the CSV you want to import:
- Source: CSV file from my computer
- Click on Choose File and select the CSV.
- Click on Next.
Third, you need to select the columns you want to import.
You can Import all the columns or Select individual columns to import.
Fourth, you need to select how you want to import the data.
In the Do you want to update or create items field, you have these options:
- Create new items and update existing items
- Import all rows as new
- Only create new items, ignore existing items
- Update existing items, ignore new items
In this case, since we’re updating existing posts, we will select the last option.
If you select any of the options to update existing items, you must match the data in the CSV with the data on WordPress. We recommend using the ID column for this, but you can use any field as an identifier.
Finally, you need to click on Start import.
As you can see, WP Sheet Editor makes it very easy to export and import your Advanced Custom Fields data using CSV files. You can easily export ACF, edit it in Excel, Google Sheets or any other CSV file editor, and import the custom fields easily from the CSV.