Import Category Replace for Magento 2 — Replace Product Categories on Import
Magento’s native product import only appends categories — it adds the ones in your spreadsheet and never removes the old ones. Re-categorising a catalogue leaves products stranded in both the new and the stale categories. Import Category Replace adds a true replace behaviour:…
You re-imported your catalogue to fix the categories. Magento kept every old one anyway.
Magento’s product CSV import has a behaviour that surprises everyone the first time: when you import a product with categories, it appends them. It adds the categories in your spreadsheet to whatever the product already has — and it never removes the ones you left out. So when you re-categorise your catalogue — a new taxonomy, a seasonal re-merchandise, a cleaned-up supplier feed — the import dutifully adds the new categories and leaves all the old ones in place. Now every product sits in two categories: the right one, and the one you were trying to remove.
The only native way out is to un-assign the old categories by hand, product by product, across the admin. On a catalogue of any size that is hours of click-work and a guaranteed crop of mistakes.
A real ‘replace’, built into the import you already use
Import Category Replace adds a replace behaviour to Magento’s standard product import. Switch it on and the categories column in your spreadsheet becomes the whole truth: the product is assigned to exactly the categories in the row, and any category it was previously in that is not in the row is removed. No new import tool to learn, no separate process — the same CSV, the same screen, with the one behaviour Magento should have shipped with.
Append vs. replace
| Scenario | Native import (append) | Import Category Replace |
|---|---|---|
| Product in “Old Range”, CSV says “New Range” | Ends up in both | Ends up in “New Range” only |
| Move 2,000 products to a new taxonomy | Hours of manual un-assigning | One import |
| Price, stock, attributes | Updated as normal | Updated as normal — only categories are replaced |
How it works
- Prepare your product CSV as usual, with the categories column set to the exact categories each product should belong to.
- Run Magento’s standard product import with the replace behaviour enabled.
- Each product is assigned precisely the categories in its row — stale assignments are removed, everything else imports normally.
Who it is for
Anyone re-organising a catalogue at scale: re-taxonomies, re-platforms, merchandising overhauls, and especially teams running automated supplier or PIM feeds where a product’s categories should always mirror the source of truth. If your category tree is meant to be driven by a spreadsheet or a feed, this is the module that makes the import actually obey it.
FAQ
Does it change the import file format?
No. It uses the same CSV and the same Magento import screen — you simply choose the replace behaviour.
What happens to a category not listed in a product’s row?
It is removed from that product. The row defines the complete, final set of categories.
Does it touch anything other than categories?
No. Price, stock, attributes and everything else import exactly as they normally would — only category assignment switches from append to replace.
Pairs well with
Import Category Replace is part of the AgenticEcom Suite and works naturally alongside Category Manager for shaping the tree and Bulk Product Operations for sweeping changes across products.




