Below, we shed light on how to import/export categories between two Magento 2 websites. Unfortunately, this functionality is not available by default, but we know for sure how to achieve the desired results. This post was inspired by the Magento
This post is an overview of the Magento 2 categories import and export. A full-featured guide on how to import and export categories, with all attributes explained can be found here:
If something is not available in Magento 2 by default, you can create a module that adds the necessary functionality. Of course, it is not the easiest way to get the desired features, but it can be the only available one. Luckily, the Magento 2 ecosystem is huge and there are already lots of third-party extensions that allow to dramatically enhance the default functionality of the platform. Often it is not necessary to recreate the wheel, since someone has already developed a Magento 2 extension with the missing feature. It is even possible to get key Enterprise Edition features on a Community-based website, but what about category import/export?
There are tons of import/export solutions developed to enhance the default functionality of Magento 2. You can check our digest here:
Firebear Improved Import
There are two versions of our import module: lite free extension and its full-featured commercial variation. The commercial tool for Magento 2 costs $238.00 and adds dedicated category import. As for the export functionality, it will be added with the next release, but you can already purchase the module, since further updates will be available for free.
As for the import functionality itself, the Improved Import Magento 2 module allows to import categories with different behaviour: Add / Edit, Delete, and Replace. Thus, the tool allows you to get all the necessary data within your Magento 2 store in the most precise manner.
Our Magento 2 extension works with CSV files that have a certain structure. Check the sample file here: Sample CSV Files for Category Import. It contains the following columns:
- name – each category has a name and you can view it here;
- Parent_id – If there is a parent category, its ID is specified here;
- url_key – each category has a URL key that is displayed here;
- Description – a column for category descriptions;
- Is_active – shows whether the category is enabled or disabled;
- Include_in_menu – shows whether the category should be included to the main menu on frontend;
- Is_anchor – this parameter is necessary for layered navigation for the category;
- Custom_layout_update – custom XML layout update for the category.
As for other features available with the Improved Import Magento 2 extension, they allow to set category position and location. First of all, you can import categories by name and full path to the category (Default Category/Women/Dresses). Besides, it is possible to leverage parent category IDs to run the import process.
Once the extension is installed and enabled, a new entity type is added to the import settings – Categories. Select it to import categories to your Magento 2 website from another one.