Import CSV into ACF fields
How a CSV import maps spreadsheet cells to Advanced Custom Fields, what changes in storage, where spreadsheet formatting breaks values, and when plain text fields are the safer choice.
What importing a CSV into ACF involves
Advanced Custom Fields (ACF) stores field values as WordPress metadata attached to posts, terms, users or options pages. A CSV import is a conversion step. Each row becomes a post or an update to an existing one, and each column is mapped to a field. ACF's built-in import and export tools handle field group definitions in JSON, not bulk content from a spreadsheet. To import content you need either an importer plugin that supports ACF or custom code that writes values through ACF's functions.
The word "import" is ambiguous here. Importing field groups recreates the structure: field names, types and settings. Importing a CSV fills that structure with values. Searches for an ACF CSV import usually mean the second, and that is the focus of this review.
Is a CSV import suitable for your use?
A CSV import suits data that is genuinely tabular and maps to simple field types, such as text, number, email, URL, select and true/false. The main benefit is a repeatable bulk update that does not require editing posts one by one. The decisive tradeoff is that every value passes through plain text on the way in. Structured fields such as dates, images, relationships, checkboxes and repeaters need the cell contents converted into the format ACF expects. The spreadsheet may also have altered values before the file was saved.
Plain text is preferable in three situations. The first is when you only need the information to be readable, not queryable or typed. The second is when the source data is nested (repeaters, flexible content, galleries) and the volume is small enough to enter by hand. The third is when you must preserve values exactly as written, for example part numbers, codes with leading zeros or free-form dates. A text field keeps them unchanged instead of converting them.
What the conversion changes
A CSV file is plain text. Delimiters separate values, and double quotes wrap values that contain the delimiter, quotes or line breaks. The import does not reverse, mirror or restyle characters. It reads strings and stores them, sometimes after converting them. What changes is the stored representation: the same cell can produce a different stored value depending on the target field type.
| Field type | What the CSV cell should supply | What ACF stores |
| Text, Textarea | The string as intended | The string unchanged |
| WYSIWYG | HTML or text | The HTML string; structure comes from the markup you supply |
| Number | A number using a dot as the decimal separator | The numeric value as a string |
| True/False | 1 or 0 | 1 or 0 |
| Select (single) | A choice value, not its label | The choice value |
| Checkbox or multi-select | Several choice values, split by your importer or code | A serialized array |
| Date Picker | A date your importer converts | Ymd (for example 20261031), regardless of the display format setting |
| Date Time Picker | A date and time | Y-m-d H:i:s |
| Image, File | A media ID, or a URL your importer resolves to a media item | The attachment ID |
| Post Object, Relationship | Post IDs, or values your importer resolves to IDs | An ID, or a serialized array of IDs |
| Repeater | Not a single cell; rows must be split or grouped | A row count plus one meta entry per sub-field per row |
ACF also writes a companion meta entry for each value. Its name starts with an underscore, and it holds the field key, an identifier beginning with field_. If you write raw post meta without it, some field types may not load or format correctly. Writing through update_field avoids this. ACF's documentation recommends passing the field key rather than the field name when a value does not yet exist for that post.
The following illustrative CSV uses a pipe inside one column to hold multiple checkbox values. It also quotes a title that contains a comma. The data is an example of format only, not a tested result.
title,sku,price,in_stock,launch_date,features
"Desk Lamp, Brass",00412,49.90,1,20261031,dimmable|usb
Floor Lamp,00987,89.00,0,20261115,dimmable
The following sketch shows how custom code might map those columns using documented WordPress and ACF functions. The post type and field keys are placeholders. Real field keys are generated by ACF and appear in the field group's settings. Run anything like this only after a backup, on a staging copy first.
<?php
// Illustrative only. Replace the post type and field keys with your own.
$handle = fopen( 'products.csv', 'r' );
$headers = fgetcsv( $handle );
while ( ( $row = fgetcsv( $handle ) ) !== false ) {
$data = array_combine( $headers, $row );
$post_id = wp_insert_post( array(
'post_type' => 'product',
'post_title' => $data['title'],
'post_status' => 'draft',
) );
if ( ! $post_id || is_wp_error( $post_id ) ) {
continue;
}
// Keep the SKU as text so leading zeros survive.
update_field( 'field_sku', $data['sku'], $post_id );
update_field( 'field_price', $data['price'], $post_id );
update_field( 'field_in_stock', $data['in_stock'] === '1' ? 1 : 0, $post_id );
update_field( 'field_launch_date', $data['launch_date'], $post_id );
update_field( 'field_features', explode( '|', $data['features'] ), $post_id );
}
fclose( $handle );
Character encoding is the one place where the import can change text itself. Save the file as UTF-8. Spreadsheet applications often offer a specific UTF-8 CSV option, and a file saved in another encoding can turn accented letters and symbols into garbled sequences. Some UTF-8 exports add an invisible byte order mark at the start of the file. If your code or importer does not strip that mark, it attaches to the first column header, and that column then fails to match its field. Characters built from several code points, such as letters with combining accents or multi-part emoji, are stored in the order they appear in the file. Problems with them usually come from encoding mismatches, not from the import reordering anything.
Will values stay readable and usable after export, copying and sharing?
Most damage happens before the import, while the data sits in a spreadsheet. Check the saved file in a plain text editor rather than trusting the spreadsheet view. Common hazards:
- Leading zeros dropped from codes, IDs and ZIP codes when a column is treated as a number.
- Long numbers converted to scientific notation or rounded.
- Dates reformatted to the local display style, or text that looks like a date converted into one.
- Locale settings that use a comma as the decimal separator and a semicolon as the delimiter, which breaks a comma-based mapping.
- Line breaks inside cells, which are valid only when the cell is quoted and which some tools mishandle.
- Curly quotes and other typographic substitutions introduced by editing tools.
Tab-separated text (TSV) is what most spreadsheets produce when you copy a range and paste it into a text editor. It avoids quoting problems when values contain commas. However, it fails if a value contains a tab, or if an editor silently converts tabs to spaces. Confirm your importer accepts the delimiter you choose, and do not assume a file pasted through chat or email kept its tabs.
An import moves data. It does not add meaning that the source lacked, and that matters for accessibility. Image alt text belongs to the media attachment, not to the ACF image field value. If your pages need alt text, import it as a separate column and set it on each attachment. Plain text imported into a textarea gains paragraph structure only if the field's new-line setting adds it. Headings and lists in a WYSIWYG field are only as accessible as the HTML you supply. Right-to-left text is stored as typed, but its display direction depends on your theme and markup, so check it on your own pages.
Searchability is another practical limit. Default WordPress search covers titles, content and excerpts, not custom field values. If visitors need to find imported values through site search, you need a search extension or a copy of key text in the post content.
A checking routine before the full import
- Back up the database and run the first pass on a staging copy.
- Import a handful of rows that include edge cases: commas, quotes, accents, empty cells, leading zeros and multiple values.
- Open the imported posts in the editor and confirm each field shows the expected value, not just that the import reported success.
- View the same posts on the front end, and with a screen reader if accessibility matters for the content.
- Include a unique identifier column so a repeat run updates existing posts instead of creating duplicates.
- Record which field keys each column maps to, so the import can be repeated or audited.
What this review could not confirm
No subject-specific evidence was available for this review. It covers no measurements, test results, prices or version dates, and it makes no claims about the features of any particular importer plugin. The storage formats described reflect ACF's documented behavior. Check them against the documentation for your installed version, because behavior can change between releases. No online CSV conversion or cleanup service was assessed, so nothing here says how such services handle or retain uploaded data. Avoid sending files with personal or confidential data to a tool whose data practices you have not verified.