WooCommerce

Importing and Updating WooCommerce Products With CSV at Scale

Importing and Updating WooCommerce Products With CSV at Scale

Most WooCommerce stores reach a point where adding products one at a time no longer makes sense. A new supplier sends a spreadsheet with 2,000 items. The pricing team updates costs for the whole catalogue every quarter. Stock levels need to sync with a warehouse system every night. The answer in each case is a WooCommerce CSV product import, and WooCommerce includes a capable importer out of the box.

It’s also easy to get wrong. I’ve seen imports that created duplicates of every product, wiped product descriptions because a column was empty, attached the wrong images to hundreds of variations and timed out halfway, leaving a catalogue in a half-updated state on a live store. This article covers how to prepare data, run imports reliably and update existing products without accidents.

The built-in importer

WooCommerce’s product CSV importer lives under Products, Import. It supports:

  • Creating new products
  • Updating existing products, matched by ID or SKU
  • Simple, variable, grouped and external products
  • Variations, linked to their parent
  • Categories, tags and attributes
  • Images from URLs
  • Custom meta fields, using column names prefixed with meta:

The exporter, under Products, Export, produces a CSV in the same format. The easiest way to understand the expected structure is to export a few existing products, especially a variable product with variations, and use that file as your template.

Step 1: Start from an export

Before building any import file from scratch:

  1. Create one example of each product type you’ll import, set up exactly as you want.
  2. Export them.
  3. Open the CSV and study the columns: how categories are separated, how attributes and variations are represented, how images are listed.

Using the exporter’s format avoids almost all mapping problems.

Step 2: Prepare clean data

Most import problems come from the data, not the importer. Before importing:

  • Use unique SKUs. SKUs are the most reliable way to match products for updates. Every product and every variation should have one, and they must be unique.
  • Save as UTF-8. Spreadsheets saved in other encodings break characters like ₹, é and curly quotes. In Excel, choose “CSV UTF-8”; in Google Sheets, CSV downloads are UTF-8 by default.
  • Check number formats. Prices should use a dot for decimals and no currency symbols or thousands separators. A price of “1,299.00” may import as 1.
  • Use consistent category paths. WooCommerce uses the greater-than sign for hierarchy, such as “Clothing > Shirts”, and commas to separate multiple categories.
  • Clean HTML in descriptions. Descriptions can include HTML, but broken tags from copied content cause layout problems.
  • Remove empty rows and stray columns.

Step 3: Variable products and variations

Variable products are where imports most often go wrong. The structure is:

  • One row for the parent variable product, with type “variable”, the attribute names and all possible values, such as “S, M, L, XL”.
  • One row for each variation, with type “variation”, a Parent column referencing the parent’s SKU or ID and the specific attribute value for that variation, such as “M”.

The parent row’s attribute must be marked as used for variations, and each variation must reference the parent correctly. The parent must exist before its variations, so either put parent rows first in the file or import parents and variations in separate passes.

Global attributes, created under Products, Attributes, are generally better than custom per-product attributes for filtering and consistency. Make sure the attribute names in your CSV match the global attributes exactly.

Step 4: Images

The importer can download images from URLs listed in the Images column, separated by commas. The first image becomes the main product image.

A few things to know:

  • Image downloads are the slowest part of an import. Large imports with many images can take a long time and are the most common cause of timeouts.
  • If images already exist in the media library, use their URLs from your own site to avoid duplicates.
  • Make sure the source server allows downloads and the URLs are publicly accessible.
  • Name images sensibly before uploading; file names carry into the media library.

For very large catalogues, consider uploading images separately first, via SFTP and a media import tool, then referencing them by URL in the CSV.

Step 5: Run a small test

Never import thousands of products on the first attempt. Take 10 to 20 rows covering every product type and variation scenario, and import them on a staging site. Check:

  • Titles, descriptions and prices
  • Categories and tags
  • Attributes and variations, including prices and stock per variation
  • Images and gallery order
  • Custom fields
  • How products look on the front end

Fix the CSV and repeat until the test import is perfect.

Updating existing products safely

Updating is riskier than creating, because mistakes overwrite good data.

Match by SKU

When updating, tick “Update existing products” in the importer. WooCommerce matches rows by ID or SKU. SKU is safer, because IDs differ between staging and production.

Only include columns you want to change

The importer only updates columns present in the file. To update prices and stock, use a CSV with just SKU, Regular price, Sale price and Stock columns. Leaving other columns out means they’re untouched.

Including a Description column that’s empty for some rows can blank out those descriptions, depending on version and settings. When in doubt, exclude columns you don’t intend to change.

Back up first

Take a database backup immediately before any bulk update on a live store. If something goes wrong, restoring is far quicker than fixing thousands of products by hand.

Avoiding timeouts on large imports

The browser-based importer processes rows in batches using AJAX, which handles moderately large files well. But very large imports, especially with images, can still hit limits.

Ways to make large imports more reliable:

  • Split files into chunks of 500 to 1,000 rows.
  • Import products without images first, then run a second pass for images.
  • Run imports during quiet hours, so the server isn’t busy with customers.
  • Increase PHP memory and execution time limits if your host allows it.

Using WP-CLI

WP-CLI with WooCommerce’s commands, or the importer called through a CLI script, avoids browser timeouts entirely. Some third-party tools also provide WP-CLI import commands. For recurring large imports, a command-line process scheduled with cron is far more robust than clicking through the importer.

When to use a dedicated import plugin

The built-in importer covers most needs. Dedicated tools like WP All Import add:

  • Flexible mapping from any CSV or XML structure, not just WooCommerce’s format
  • Scheduled imports from URLs, such as a supplier’s feed
  • Complex logic, such as price markups, conditional categories and calculated fields
  • Better handling of very large files

They’re worth considering for supplier feeds, dropshipping and recurring synchronisation with external systems.

Keeping catalogue sync reliable

If you sync stock or prices regularly from another system:

  • Use SKUs as the shared identifier everywhere.
  • Log every import, including the number of products created, updated and skipped.
  • Alert on failures, such as an import that updated zero products when it normally updates hundreds.
  • Never let a sync delete products automatically without review.

A worked example: quarterly price updates

A client with about 4,000 products updated prices every quarter from a supplier price list. Their old process was to import the supplier’s full product file, which overwrote descriptions the marketing team had improved and occasionally reset categories.

We changed the process to a two-column approach. The supplier file was reduced in a spreadsheet to just SKU and Regular price, with a formula applying their markup. Before importing, a quick check compared the number of SKUs in the file with the number in the store and flagged any SKU in the file that didn’t exist in WooCommerce. The WooCommerce CSV product import then ran with “Update existing products” ticked, during a quiet hour, after a database backup.

The whole update now takes about fifteen minutes, nothing but prices changes, and any unmatched SKUs are reviewed before they cause trouble. The principle generalises: keep update files as narrow as possible, validate them before importing and never import more columns than you intend to change.

Validating after the import

After any large import, spot-check results rather than assuming success. Compare product counts before and after. Open a sample of products from different categories and check prices, stock, variations and images. Look at the importer’s summary for skipped or failed rows and investigate each one. On stores with Google Merchant Center feeds, check the next feed update for new errors, because import mistakes often surface there first.

Frequently asked questions

Why did my import create duplicates?

Usually because “Update existing products” wasn’t ticked, or SKUs in the file didn’t match existing products exactly, including spaces or capitalisation.

Can I import products with custom fields?

Yes. Add columns named meta:field_name, and the importer stores them as post meta.

Why are special characters broken after import?

The file wasn’t saved as UTF-8. Re-save it with UTF-8 encoding and import again.

Can I schedule imports with the built-in importer?

Not directly. For scheduled imports, use WP-CLI with a cron job or a dedicated import plugin with scheduling.