DEV3 Technologies home

DEV3 Developer Forum

How do I bulk import WooCommerce products from a CSV without duplicates?

WordPress helpSolved0 views
dev3 ·

I have 3,000 products in a spreadsheet. When I use the WooCommerce importer, rerunning it creates duplicates or fails with a timeout. What is the right approach?

#woocommerce#csv#import

0

1 reply

dev3 · Accepted answer

Use the built-in importer (Products > Import) with a stable identifier, and keep batches manageable.

Update, do not recreate. In the importer's mapping step, enable "Update existing products". WooCommerce matches on ID or SKU. SKUs must be unique, and the CSV column should be named SKU. If you leave SKU empty, every row becomes a new product.

Minimum columns: Type, SKU, Name, Published, Regular price, Categories, Images, In stock?, Stock.

Notes on formats:

  • Categories: Clothing > Shirts, Sale (hierarchy with >, multiple separated by commas).
  • Images: comma-separated URLs (the first becomes the featured image); the server must be able to download them.
  • Variable products: first a variable parent row, then variation rows with Parent set to the parent SKU, and attributes in Attribute 1 name / Attribute 1 value(s).
  • Save as UTF-8 CSV, delimiter comma. Excel regional settings sometimes use semicolons; set the delimiter in the importer's advanced options.

Timeouts. The importer processes in batches via AJAX, but slow image downloads can hit PHP limits. Raise max_execution_time and memory_limit, or split the file into 500-row chunks. WP-CLI avoids browser timeouts if you use a plugin or script that offers a CLI importer.

Pitfalls

  • Test with 10 rows on staging first, and export existing products before overwriting.
  • Run an export after import to compare counts.
  • After import, regenerate the lookup tables if WooCommerce prompts (WooCommerce > Status > Tools) and clear caches.
  • Prices with currency symbols or thousand separators import as text; use plain numbers like 19.99.
0

Your reply

Every post is reviewed by DEV3 before it appears. Usually reviewed within 24 hours.

Markdown supported. Use ``` for code blocks. Images are not allowed.