Skip to content
CatalogImport Fix

Category formatting

WooCommerce CSV categories: keep commas and hierarchy clear.

Separate the CSV field from the category names inside it. Use two draft examples to check the grouping your store actually creates.

Reviewed 10 October 2026Core importer · Draft category starter

A category import can be valid CSV and still create the wrong grouping. The outer CSV format decides where the product's columns end. The text inside Categories then describes category names and paths. Work through those two layers separately so a product called “Mug, blue” stays one name and a category called “Kitchen, Dining” stays one category.

Scope: these examples use the built-in WooCommerce product CSV importer. The free checker can review the file's structure, but it cannot decide your intended taxonomy, confirm existing store categories, or verify the resulting category assignments.

Tell a category list from a category name

In the core format, commas separate category terms, > describes hierarchy, and a backslash escapes a comma that belongs to one name. A comma-containing field also needs normal CSV quotation marks. Compare these values before filling a whole supplier column:

Category values and their CSV representation
Intended resultCategories valueField in saved CSV text
One category named MugsMugsMugs
Mugs beneath HomeHome > MugsHome > Mugs
Two assignments: Home / Mugs and GiftsHome > Mugs, Gifts"Home > Mugs, Gifts"
One category named Kitchen, DiningKitchen\, Dining"Kitchen\, Dining"

The backslash in the last example belongs to WooCommerce's category syntax. It does not replace the CSV quotes: without those quotes, the comma can still split the product row into columns. When editing a spreadsheet, enter the category value in one cell; after export, inspect how that cell appears in the saved text.

If a literal category name contains >, pause and test the intended result rather than treating the symbol as ordinary punctuation. Keep the spelling and hierarchy consistent with an export from your own store where possible.

Download a draft category test file

Download category starter

The file contains two illustrative simple products. One tests a hierarchy plus a second category; the other tests a literal comma in a category name. Both use Published=-1 for drafts. Names, SKUs, category labels, and the 19.00 example price are placeholders: replace them with approved test values before use.

Type,SKU,Name,Published,Regular price,Categories
simple,EXAMPLE-CATEGORY-001,Example category test - replace me,-1,19.00,"Home > Mugs, Gifts"
simple,EXAMPLE-CATEGORY-002,Example literal comma test - replace me,-1,19.00,"Kitchen\, Dining"

Use a staging store because even draft product tests can change taxonomy data. Check that each test identifier is unused; do not import the placeholder SKUs repeatedly into a live catalog. The sample has no images, so the checker may report a missing-image warning. It is designed to isolate category formatting rather than represent a finished product.

Diagnose the result before changing the file

What an unexpected category result tells you to inspect
Observed resultQuestion to answerNext step
A single name becomes two categoriesIs its internal comma escaped in the Categories value?Compare one corrected field with the original, then repeat the small test.
Two intended categories appear as an unexpected nameDid you accidentally treat the separator comma as part of one name?Write the two intended assignments on separate lines in your mapping notes before rebuilding the cell.
The row has too many columnsDid a comma in Categories or Name escape the outer CSV field?Inspect CSV quotation marks before investigating store taxonomy.
A category appears at the wrong levelDoes the path express the intended parent and child?Compare the path with the store's category tree and a known-good export.
The product has no expected assignmentWas Categories mapped, and did the intended product row import?Check mapping and the import report before rewriting category labels.
Near-duplicate labels appearDid spelling, whitespace, or the hierarchy differ between rows?Choose an approved taxonomy map and inspect the test results; do not silently rename existing terms.

Agree on a supplier-to-store category map

Make a small mapping sheet with four columns: supplier value, intended store category path, a representative SKU, and the reviewed result. A supplier's “Kitchen / Drinkware” may be a label rather than a literal store hierarchy. Decide its destination explicitly instead of replacing every slash automatically.

Keep the source text alongside the approved path. If several supplier labels should share one store category, document that choice. If two labels mean different merchandising groups, preserve that difference. A formatting cleanup cannot make the commercial decision for you.

For updates, start with a small store export so you can compare current assignments and matching identifiers. Do not assume a partially populated Categories cell will preserve every existing assignment. Test the update result and retain a recoverable export before applying the rule to the full catalog. The SKU guide explains why the matching identifier deserves a separate check.

Test both cases and inspect the resulting tree

  1. Back up the store and use staging. Replace the starter's placeholders with two deliberate test products and approved category names.
  2. Save a UTF-8 CSV copy. Check that the six headers still produce six fields in each row; names containing commas also require normal CSV quoting.
  3. Check the saved CSV, then review the report. Category meaning and existing store records remain outside this file-level check.
  4. Open Products → Import, review Categories and the other mapped fields, and choose the appropriate create or update mode.
  5. Save the import report. Open each resulting draft and compare its category assignments with the intended result in the table.
  6. Inspect Products → Categories: check the literal comma name and the parent-child relationship. Resolve extra or misplaced terms on staging before expanding the import.

Pass condition for the sample

The hierarchy test has the intended child under its intended parent plus the separate second category. The literal-comma test has one complete category name. Both products remain drafts, their identifiers match your test plan, and no unexplained category terms remain.

Keep the successful sample and mapping sheet as your reference for later batches. If the categories still disagree with the source, request a scoped review using a redacted row and the expected category tree. For missing product pictures, continue with the image import troubleshooting guide.

References: WooCommerce core product CSV importer documentation and the official CSV schema. These examples concern the built-in importer; an extension may use different fields or separators. Review the documentation for your installed version.