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: the categories in your CSV become the product’s complete category set, old assignments removed. A full re-taxonomy becomes a single import.
Perpetual licence — one payment. The version you buy is yours to keep and use for as long as you like, with 12 months of updates and priority support included. When the year ends your store carries on running exactly as it is — only updates and support stop. Renewing is optional, any time: 40% off the list price (not the promotional price). We email you before your licence year ends.
Import Category Replace is a Magento 2 module that adds a Replace behaviour to Magento’s native product import, making the categories column in your CSV authoritative: it removes categories a row no longer lists instead of only appending, turning a catalogue-wide re-taxonomy into a single import.
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.
Frequently asked questions
Does it change the CSV format?
No — same columns, same categories path format as native import. You just set the behaviour to Replace in config.
What happens to a category I don't list for a product?
In Replace mode it's removed from that product. The row defines the complete, final set of categories.
Could an import accidentally wipe all my categories?
No. Rows with an empty categories cell are skipped entirely, and a value that resolves to no valid category id is skipped too — so a partial import (price only, stock only) never touches category links.
Does it work from the CLI too?
Yes. It observes catalog_product_import_bunch_save_after in global scope, so it applies whether the import runs from the admin or bin/magento import commands.
Pairs well with…
Category Manager for shaping the tree and Bulk Product Operations for sweeping product changes.







