"Invalid or duplicated SKU", and prices or stock on the wrong products after a WooCommerce import
You imported a CSV file with Update existing products ticked. The last screen says Failed to import 2 products, and View import log shows Invalid or duplicated SKU. Or a row was skipped with No matching product exists to update. Or the screen says 32 products updated, your products look as before, and other products carry the new prices.
In short: three different things lead here. Two products share one SKU: their rows fail, and nothing changed on them. A SKU was changed in the shop since the export: the old file puts the old SKU back, or skips the row. Or the shop still holds marks of an earlier import that broke off, and the importer took your IDs for other products: here the way back needs an export or a backup from before.
First, read what the importer says
On the last screen, select View import log. It lists each row that failed or was skipped under Product, with a Reason for failure. Rows that were updated are counted and not listed: WooCommerce keeps no list of the products an import changed.
- Invalid or duplicated SKU. and the row names the ID from your file: two products share a SKU.
- Invalid or duplicated SKU. and the row names an ID that is not the one in your file: the shop holds marks of a broken-off import.
- No matching product exists to update.: the SKU or ID in the file is no longer in the shop.
- No failure at all, and the wrong products changed: marks of a broken-off import again.
Two products share one SKU
WooCommerce's product editor refuses a SKU that another product has. An older import, a plugin or a copy of a product can still leave two products with the same SKU. The importer writes each row's SKU onto its product, WooCommerce refuses it, and the whole row fails.
In our test shop two products shared the SKU ART-001. A file of ID, SKU and Regular price, 32 rows: Import complete! 30 products updated. Failed to import 2 products, and the log named both, "ID 180, SKU ART-001" and "ID 181, SKU ART-001". The two products had not changed in any value. The same happened with a file of SKU and Regular price alone.
The way out
- Nothing is to be undone: a failed row changed nothing, and the other rows are right.
- Find the two. In Products → All Products, type the SKU from the log into the search field and select Search products. In our shop the list showed both products.
- Import the failed rows by ID alone. Make a file of those rows with the
IDcolumn and the columns you are changing, and noSKUcolumn. In our shop a file of ID and Regular price updated both twins: 32 products updated, each product with its own price. Open both products afterwards and see the new value there: the sentence counts rows and does not say where they went (see below). - Or give one of them its own SKU in the product's Inventory tab, and write the new SKU into your file too. With the old SKU still in the file, that row failed again in our shop.
A SKU was changed since the export
A file is as old as its export. In our shop we changed one product's SKU from ART-003 to NEW-003 after the export, and imported the old file:
- With ID and SKU in the file, the product was found by its ID, and the file's SKU was written onto it: it was ART-003 again. The screen counted the row among the products updated and said nothing about it.
- With the SKU alone, the row was skipped: 1 product was skipped, and the log said No matching product exists to update. Nothing changed.
The way out
- A skipped row: write the product's present SKU into the file, or add its ID, and import that row again.
- A SKU that was put back: set it again in the product's Inventory tab. To find such products, make a new export and compare its SKU column with the SKU column of an export from before the import, ID by ID. Without an earlier export only you know which SKUs you changed.
Rows landed on other products: marks of a broken-off import
This is the rare one, and the one that does harm quietly. When products are added from a file that has an ID column, as when a shop is moved, and "Update existing products" is not ticked, the importer gives each new product a hidden mark with the ID from the file. It takes all marks off when an import runs to its end. If that import broke off, by a closed tab or a server that gave up, the marks stay. For every row of a later file, the importer looks for a product with such a mark first, and only then for the product that has that ID.
In our test shop we imported a file of 150 products of another shop and closed the tab at 40 of 100. The shop then held 90 new products, each with a mark. Then we imported a price file for the shop's own 32 products, by ID, with the box ticked:
- With ID and Regular price: the screen said Import complete! 32 products updated. All 32 prices were on products of the broken-off import. None of the shop's own products had changed.
- With ID, SKU and Regular price: 2 products updated. Failed to import 30 products. The log said Invalid or duplicated SKU. and named other IDs than the file's: "ID 214, SKU ART-001" for the row of product 180. The two rows without a SKU landed on other products, and emptied the SKU of those products.
- After either import all marks were gone, because it had run to its end. The same file, imported a second time, went to the right products.
The way out
- Do not import the file a third time to see what happens. The second run is already right. The harm is what the first run wrote onto other products.
- If you have an export from before that import, one that holds all products of the shop: make a file from it with the
IDcolumn and the columns your file changed, theSKUcolumn among them if your file had one, and import it with the box ticked. In our shop a file of ID and Regular price from such an export said 123 products updated, and every price in the shop was as before. Then we imported the price file again, and it changed the 32 products it was meant for. - If you have no such export, WooCommerce cannot tell you which products were changed: the marks are gone, and no list is kept. The values are then in a backup of the site, or have to be set again by hand. In our shop the products that were hit were those of the broken-off import. Putting a whole backup back also takes away every order since it was made, so ask your host first whether single values can be read from it.
The limits of this way out: it puts back the columns you take from the old export, with the values of that day. What changed in the shop between that export and the accident is not in it.
So that it does not happen again
- Export all products before every import, and keep the file unchanged. It is the way back in each of the cases above.
- Import a row or two first, and look at that product and at no other. An import that runs to its end, however small, also takes the marks off.
- For an update, go by ID and leave the SKU column out, unless the file is meant to change SKUs. A file by SKU alone needs a fresh export.
- Check the file first. Our free CSV import checker reads the file in your browser and names a SKU or an ID that stands on more than one row, among other things. It sees the file and not the shop: two products that share a SKU in the shop show up only if both are in the file.
- Our free tools for prices, sale prices and a stock count write files that go by ID, with no column matched to the SKU, and hand out a check file to import first, because of these marks. Each tool's page says how.
If you would sooner change prices and stock with no file at all: Stockrows is our paid Google Sheet for a WooCommerce shop. It lists every change before anything is sent and keeps the old values of each push. How it works.
We tried every step on this page on 29 and 30 November 2026 in a test shop of our own: WordPress 7.1.5, WooCommerce 11.3.1, through the admin's own Import screen, with each product read before and after. The words in bold are those of these versions' screens. The reasons come from the code of WooCommerce 11.3.1 (includes/import/class-wc-product-csv-importer.php) and from WooCommerce's page Product CSV importer and exporter. Another version, or a plugin that changes the import, may behave differently: try a file of two or three rows first.