A CSV import fails most often because the file has the wrong shape, not because the plugin cannot read it. This article covers how to build a template that works the first time.
The fastest way to get a template #
Export ten records of the type you want to import, using the columns you plan to fill in. That file is your template. Its headers match what the importer expects exactly, and the ten rows show you the format each field wants.
- Open the Export tab and pick the module.
- Choose Advanced export.
- Set a record limit of 10 on the filters step.
- Select the columns you want in your template.
- Export as CSV or XLSX.
Delete the ten sample rows, keep the header row, and fill in your own data. Building a template by hand from a blog post is guesswork; building it from an export is not.
Product columns #
Identifiers #
| Column | Notes |
|---|---|
product_id | WooCommerce product ID. Leave blank for new products. |
sku | Your own product code. Used to match existing products when no ID is present. |
parent_sku | Required on variation rows. Points at the parent product. |
Core fields #
name,description,short_descriptionstatus(publish, draft, pending, private)regular_price,sale_pricestock,stock_status,manage_stock,backordersweight,length,width,height
Taxonomies and custom fields #
Category and tag columns use a tax: prefix. Custom fields written by other plugins use a meta: prefix. Both appear in an export when you tick Include custom meta, which is the easiest way to see the exact names your store uses.
Order columns #
Orders are the most structured module. Beyond the obvious fields (order_id, status, order_total, customer_email, billing and shipping address fields), several columns carry compound data:
| Column | Contains |
|---|---|
line_item_meta: columns | Product name, quantity, price, and SKU per line |
shipping_items | Shipping lines on the order |
fee_items | Fee lines |
tax_items | Tax lines |
coupon_items | Coupons applied |
refund_items | Refunds recorded |
order_notes | Notes attached to the order |
You do not map these by hand. The importer recognises them by their column key and carries them through automatically. Do not rename them.
Order totals are read from your file, not recalculated. If the total column is blank, the order imports with a zero total.
Customer and coupon columns #
Customers need an email address at minimum, since that is what matching falls back to when there is no ID. Coupons match on code, so the coupon code column is the one you cannot omit.
Formatting rules #
- Save as UTF-8. In Excel, use Save As → CSV UTF-8. Anything else mangles accented characters.
- Keep the header row. The importer reads column names from row one.
- Use XLSX if your SKUs start with a zero. Excel strips leading zeros from CSV.
- Dates in
YYYY-MM-DD HH:MM:SS. - Prices as plain numbers with no currency symbol and a dot as the decimal separator.
- Yes/no fields as
yesorno.
Extra columns are fine #
A supplier file with forty columns you do not need imports without complaint. Leave those columns unmapped on step 4 and the plugin ignores them. You do not need to strip a file down before importing it.
Test before you commit #
Import five rows first. Open one of the resulting records and compare it against your source file. Two minutes here catches nearly every template mistake before it reaches forty thousand rows.