Skip to main content
Updates / The Fastest Way to Import WooCommerce Variable Products from CSV
← All updates
 
Blog

The Fastest Way to Import WooCommerce Variable Products from CSV

When I import WooCommerce variable products from a CSV file, the first thing I check is the comma. It separates each column, and on a parent product’s row, it often separates the sizes or colors offered as well. However, those commas only work if the cell has quotation marks around it. Without the quotes, each size is read as its own column, and every value after it in the row moves into the wrong column.

This is important for variable products because each variation is linked to its parent by a value in one column. If that value moves to a place where it doesn’t belong, the variation can’t be matched to its parent. Once the columns line up, WP All Import links every variation in a CSV to its parent product in a single import run, using the linking column the file already has.

Below, I cover the comma and the other CSV details that protect that link, then the four Automatic Setup steps that get a variable product CSV into WooCommerce in one pass.

How a Variable Product Fits into a Flat CSV

The kids’ rain boot I use as the example in this guide comes in two colors and three sizes. In WooCommerce, that’s one variable product with six variations. A CSV can’t group those variations under the boot, so each one gets its own row. That makes seven rows in total, one for the parent and six for the variations.

One variable product, row by row

kids-rain-boots.csvPuddle Jumper parent row + 3 of its 6 variations
Row Item Code Parent Code Color Size RRP
Parent 004120 — Navy|Crème 7-8|9-10|11-121 —
Variation 004120-NAV-78 0041203 Navy 7-82 34.99
Variation 004120-NAV-910 004120 Navy 9-10 34.99
Variation 004120-CRM-78 004120 Crème 7-8 34.99
  • 1Parent rowEvery size the boot is sold in, separated by pipes
  • 2Variation rowOne size for this variation, with its own SKU and price
  • 3Link columnThe parent’s SKU, which ties this row to the boot

The parent row lists every size and color the boot comes in. Each variation row has its own SKU and price for one size and color. It also repeats the parent’s SKU in a linking column, which is what ties the variation to the boot.

WooCommerce’s built-in importer has strict rules for this layout.

  • Each variation row must have variation in its Type column.
  • Each variation must list its parent’s SKU or ID in a Parent column.
  • Each attribute needs two columns, one for the name (like Size) and one for the values.
  • On version 11.1 and later, the parent row must come before its variations to import everything at once. For older versions, the WooCommerce documentation recommends two imports.

WP All Import is much more flexible about how a variable product CSV is laid out. Its Automatic Setup turns a plain Size or Color column into a WooCommerce product attribute, and it reads the parent link from whichever column the CSV already uses. The values in those columns still need to be clean, though, and that’s what the CSV details below are about.

The comma isn’t the only thing in a variable product CSV that can cut a variation off from its parent. These four details matter just as much, and each one has a quick fix.

Four CSV details to check before importing

CSV detail Why it matters for variations What I do
Separators A CSV puts commas or semicolons between columns, and often pipes between the values in a cell, like the sizes on a parent row. Automatic Setup reads both kinds of file. I still check that Product SKU appears under Field Mappings before running the import, and I add a note such as • 'Map the Item Code column to Product SKU' if it isn’t there.
Encoding WP All Import reads every CSV as UTF-8, so accented color names like Crème come through garbled when the file was saved in another encoding. I re-save the file as UTF-8 before I import it.
Spreadsheet edits Excel changes a size like 9-10 into a date, so that variation no longer matches its parent’s sizes. It also strips leading zeros from SKUs, which breaks matching with products already in WooCommerce. I edit the CSV in a text editor, or open it in Excel through Data › From Text/CSV and set Data Type Detection to Do not detect data types.
The link column Each variation needs its parent row above it in the file. Some files also group variations by a shared title or a group code instead of a parent SKU. I keep every parent row above its variations. When the file doesn’t use a parent SKU, I confirm the link option in Manual Setup’s Variations tab.

WP All Import carries every Automatic Setup mapping into Manual Setup, so changing the link option or adding a missing field doesn’t mean rebuilding the import from scratch. If your CSV groups variations in an unusual way, this guide to importing variable products covers every linking method one by one.

Running the CSV Import with WP All Import’s Automatic Setup

You’ll need WP All Import Pro and its WooCommerce Import Add-On to import variable products. Once both are active, getting the CSV into WooCommerce takes only four steps.

Step 1: Upload the CSV or a Zipped Copy

Go to All Import › New Import and click Set up automatically at the top of the screen. On Step 1: Select Your Import File, the Upload File tab is the quickest route for a CSV saved on your computer. The uploader takes files up to 256MB, and a larger CSV can go in as a ZIP or GZ file instead.

wp-all-import-automatic-setup-upload-variable-product-csv

Step 2: Select WooCommerce › Products and Note Any Unusual Separators

Choose WooCommerce, then the Products card, which covers simple, variable and grouped products. WP All Import’s Automatic Setup reads commas or semicolons between columns, and pipes between the values in a cell without any instructions. 

The Add Setup Instructions box below the cards is there to clarify ambiguous fields, like a column whose name doesn’t say what it holds. Each note goes on its own line as a bullet, with the note in single quotes, and a note like • ‘Map the Item Code column to Product SKU’ tells Automatic Setup exactly where that column belongs.

wp-all-import-automatic-setup-instructions-variable-product-csv

When you’re ready, click Start Automatic Setup.

Step 3: Match the Record Count to the CSV’s Rows

The Your Import Is Ready screen shows how many fields were mapped and how many records will be imported. That records number should match the rows below your CSV’s header. My rain boot file has 13, and the screen reported 13 as well. A lower number means rows have merged, which happens when a quotation mark is not closed.

wp-all-import-your-import-is-ready-variable-product-csv

Expand Field Mappings to see where each column went. WP All Import’s Automatic Setup maps a CSV’s parent column to WooCommerce’s Parent Product ID field on its own, even when the column has a name like Parent Code. It also sets the Product Type to variable, so the file doesn’t need a type column. Click Run Import, and the summary should list every record as created.

wp-all-import-variable-product-csv-import-complete

Step 4: Check the Variations and Their Accented Values

Open the product from Products › All Products and go to its Variations tab. Each variation should have its own SKU and price, plus its own stock count, and accented values, like Crème in my file, should read exactly as they do in the CSV. Check that every variation has a regular price too, because WooCommerce doesn’t show variations without one in the store.

woocommerce-variable-product-variation-creme-sku-price

Finally, open the product page and pick a color and size. Choosing Navy and 9-10 for the boot in my product list brings up its $34.99 price and an “18 in stock” message, and the Add to cart button becomes active.

woocommerce-variable-product-csv-storefront-variation

Final Thoughts

The rain boot CSV went into WooCommerce exactly as I’d written it, with supplier-style column names, no type column and no setup notes. WP All Import is the fastest way I’ve found to import WooCommerce variable products from a CSV, because its Automatic Setup maps the file’s own column names to WooCommerce fields. WooCommerce’s built-in importer expects the file to be rebuilt around its own type labels and paired attribute columns first.

The few minutes I still spend go into the file itself, mostly checking that nobody has opened and saved it in Excel. After that, Automatic Setup handles the mapping and links every variation to its parent product. I recommend WP All Import to any store that receives its variable products as CSV files.

Common Questions About Importing WooCommerce Variable Products from CSV 

How do I link variations to a parent product in a CSV?

WP All Import links variations to their parent product using the parent column already in your CSV. To set the file up for that:

  • Give each parent row its own SKU.
  • Put that parent SKU in a parent column on every variation row.
  • Keep each parent row above its variation rows.
  • Upload the CSV through All Import › New Import › Set up automatically.
  • Before you click Run Import, check that Parent Product ID under Field Mappings points to your parent column.

Why do some variations import as separate products?

Variations import as separate products when they can’t be matched to a parent row. The usual causes are a variation row that sits above its parent, or a parent SKU on the variation row that doesn’t exactly match the parent’s own SKU. WP All Import’s Automatic Setup shows the parent mapping under Field Mappings before anything is imported, so you can check the link first. If it’s already happened, move each parent row above its variations, fix any mismatched SKUs and run the import again.

Can WooCommerce import a semicolon-separated CSV?

Yes. WooCommerce’s built-in importer imports a semicolon-separated CSV once you set the CSV Delimiter under Show advanced options. WP All Import’s Automatic Setup reads a semicolon-separated CSV on its own, with no delimiter setting to change.

How do I fix garbled characters after a CSV import?

To fix garbled characters after a CSV import, re-save the CSV with UTF-8 encoding and run the import again with the new file. WP All Import reads every CSV as UTF-8, so accented letters in values like Crème only come through cleanly when the file is saved that way. Most text editors and spreadsheet apps offer UTF-8 in their Save As options.

How do I update variation prices and stock from a CSV?

You can update variation prices and stock from a CSV with WP All Export and WP All Import working together:

  • Export your variable products with WP All Export, which puts each variation on its own row.
  • Change the prices or stock counts in that file.
  • Import the edited file with WP All Import.
  • WP All Import matches each row to its existing variation and updates only the fields in the file.

The full process is in How to Bulk Edit WooCommerce Variable Products.

Further Reading

Get Oxygen

Build it your way with Oxygen.

$199.50 once — unlimited sites, no renewal

Not per year, not per site, not per seat. 60 day money back guarantee.