---
title: "How to Import CSV Files into WordPress with Field Mapping"
url: "https://wpimportexport.com/how-to-import-csv-files-into-wordpress-with-field-mapping/"
description: "Import CSV files into WordPress with Auto Map. Download a sample, map a custom column to Excerpt, and import draft posts in the admin or with an AI agent."
type: post
published: 2026-06-12T11:28:47+00:00
modified: 2026-11-26T15:02:49+00:00
categories: ["Import Export Guides", "Migration"]
tags: ["ACF import", "CSV Field Mapping", "CSV Import Plugin", "Custom Fields Import", "Import CSV into WordPress", "WooCommerce CSV Import", "WordPress CSV import", "WordPress Data Migration", "WordPress Import Plugin", "WP Import Export"]
docs_topics: ["Import guides"]
---

# How to Import CSV Files into WordPress with Field Mapping

A spreadsheet rarely uses WordPress’s own names for its columns. Some headers already match, such as `post_title`; others, such as a column called `editor_note`, only make sense to the person who wrote the sheet. In **Import Export by RockStarLab → Import → Blog Posts**, upload the file and look at its columns in the preview. **Auto Map** assigns the headers WordPress recognizes, and you drag each remaining column onto the field where its value belongs.

## Download a CSV and decide where each column belongs

[Download the two-post field mapping example (CSV)](https://wpimportexport.com/wp-content/uploads/2026/06/field-mapping-posts.csv). Each row describes one draft. The spreadsheet calls its summary `editor_note`; in WordPress we want readers to see that text wherever the theme displays a post excerpt. That choice determines the manual mapping.

| CSV header | WordPress destination | Value for the first post |
| --- | --- | --- |
| post_title | Title | River Walk Notes |
| post_name | Slug | mapping-river-walk |
| post_content | Content | Follow the riverside path to the footbridge. |
| post_status | Status | draft |
| editor_note | Excerpt | A short walk, with two viewpoints. |

## 1. Upload the file and check the preview

Back up the database before importing into an existing site. Choose **Blog Posts**, click **Next Step** and select the downloaded file. Keep the header row enabled. The sample uses a comma delimiter and has five columns. In the first row, the comma after “walk” belongs inside a single excerpt cell. If the preview splits that phrase, check your CSV quoting before continuing. If each row appears in a single column, check the delimiter.

![Preview of two draft posts with five source columns](https://wpimportexport.com/wp-content/uploads/2026/11/csv-preview.webp)

_The preview shows the values WordPress will read, including punctuation inside the excerpt._

## 2. Use Auto Map and review the four matches

Click **Auto Map** on the Field Mapping screen. For this file the counter reads **4 / 5 fields mapped**. Check Title, Slug, Content and Status. Slug deserves a second look if you plan to update these posts later: the matching option in the next step can use that value to find the original record.

![Auto Map showing four of five CSV columns mapped](https://wpimportexport.com/wp-content/uploads/2026/11/auto-map.webp)

_The standard headers match automatically. The spreadsheet heading editor_note has no destination yet._

## 3. Map editor_note to Excerpt

Under **Your File Columns**, find `editor_note`. Drag it onto **Excerpt** under WordPress Fields. The counter should now read **5 / 5**. In Mapped Fields, check that `editor_note` points to `post_excerpt`. Mapping it to Content would put a short summary in the main article body. On a real import, leave a column unmapped if WordPress has no use for it.

![Field mapping after connecting editor_note to the WordPress excerpt](https://wpimportexport.com/wp-content/uploads/2026/11/manual-excerpt.webp)

_All five source columns now have destinations._

For a custom destination, first choose the right content type and look for the field in the appropriate group. A taxonomy term, an ACF field and plain post metadata can hold similar text but appear in different places in WordPress. For repeater rows or layouts, follow the [ACF field import walkthrough](https://wpimportexport.com/how-to-import-posts-pages-custom-post-types-with-acf-pro-fields/). If a value needs cleaning as well as mapping, see [field transformation functions](https://wpimportexport.com/content-transformation-functions-for-wordpress-import-and-export/).

## 4. Choose how to handle matching posts

For the example, match by **Slug**. On the first run, allow missing items to be created. The CSV supplies `draft` for both rows. If the example slugs already exist on your site, inspect those posts before choosing to update them. On a later run, use the same slugs and choose Update for existing records. Choose Skip for missing records if that run should only edit existing posts.

![Import options for matching blog posts by slug](https://wpimportexport.com/wp-content/uploads/2026/11/import-options.webp)

_The matching field determines which existing record an incoming row can update._

Click **Start Import**. On a site where neither slug exists, expect two created posts and zero failures. For a repeat run, the guide to [updating existing posts by a stable identifier](https://wpimportexport.com/how-to-bulk-update-existing-wordpress-posts-without-creating-duplicates/) explains how to check which records changed.

![Import result showing two posts created and zero failures](https://wpimportexport.com/wp-content/uploads/2026/11/completed.webp)

_Two rows created two drafts on the first import._

## 5. Open a draft and check the excerpt

Go to **Posts → All Posts** and open **River Walk Notes**. The main paragraph should end with “to the footbridge.” In the Post settings sidebar, the excerpt should read “A short walk, with two viewpoints.” Open **Market Square Notes** for the second row: its excerpt should read “A morning route through the market.” Checking two different values helps catch a repeated or misplaced column.

![River Walk Notes in WordPress with its imported paragraph and excerpt](https://wpimportexport.com/wp-content/uploads/2026/11/wordpress-excerpt.webp)

_The body and the excerpt occupy separate fields in the WordPress editor._

## Import the same CSV with an AI agent

Follow the [WordPress AI agent connection guide](https://wpimportexport.com/how-to-use-the-wordpress-abilities-api-with-ai-agents-exports-imports-content-sync-and-backups/), attach the CSV to your agent and identify the destination site. Start by asking for the mapping before any writes:

Without the plugin, WordPress 7.1.5 gives a connected agent only three read-only abilities for site, user and environment information. The exports, imports and syncs in the requests below are abilities of Import Export by RockStarLab.

> Preview the attached CSV for a Blog Posts import. Show the two rows and propose a source-to-destination mapping for all five columns. Map editor_note to post_excerpt. Show me the first excerpt in full, including its comma. Stop after preview.

Once the destinations look right, specify how the agent should handle matches. This prompt repeats the import after the admin walkthrough:

> Apply the approved mapping to the two existing drafts. Match by post_name, keep draft status, update existing matches and skip missing records. Return the import job ID and final counts. Check that River Walk Notes still has its footbridge paragraph and the separate excerpt “A short walk, with two viewpoints.”

The agent can read the headers with `rsl-ie/file-preview`, submit the five mappings to `rsl-ie/import-start` and check completion with `rsl-ie/job-get-result`. For a first import, explicitly ask it to create missing drafts instead. You can also follow the [CSV and Excel post import guide](https://wpimportexport.com/import-wordpress-blog-posts-from-csv-excel/) for the wider workflow.

## Frequently asked questions

### Can I use a CSV with my own column names?

Yes. Keep the header row and drag each unfamiliar column to its WordPress destination. A column called editor_note can populate the standard Excerpt field.

### Why does the preview show one column?

Choose the delimiter used by the file and check the preview again. For the downloadable sample, use a comma and keep the header row enabled.

### How do I prevent duplicate posts on a second import?

Keep the original slugs, match existing posts by Slug and choose the action for existing records. To limit a repeat run to existing posts, choose Skip for missing records.

### Can I use an Excel or JSON file instead?

The upload screen also accepts XLSX, ODS, JSON and XML. Preview the source and check which columns are available before assigning destinations.

## Related Guides

- [Save and Reuse Field Mapping Templates for Recurring WordPress Imports](https://wpimportexport.com/save-reuse-field-mapping-templates-wordpress-import/)
- [Get Email and Webhook Alerts When a WordPress Import Finishes (and Fix Failed Rows)](https://wpimportexport.com/wordpress-import-email-webhook-alerts-failed-rows/)
