How To Import/Export Categories to Magento 2

Magento 2 Development

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 StackExchange discussion. Question by Rafael Corrêa Gomes; answer by KAndy.


This post is an overview of the Magento 2 category import and export. A full-featured guide on how to import and export categories, with all attributes explained can be found here:

Read full-featured Magento 2 Category import and export guide

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: The Best Improved Import/Export Extensions for Magento 2. As for category import, there is the Bulk Categories Import / Export module by Commerce Extensions and our Improved Import extension.

Firebear Improved Import and Export

Improved Import and Export for Magento 2 is irreplaceable when it comes to data transfers. Be it categories or any other Magento 2 entity, the extension processes the entity specifics to the tiniest detail and allows performing flexible import and export based on the improved data transfer logic.

Download / Buy Firebear Improved Import Magento 2 Extension

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.

Moreover, Improved Import and Export support various data sources which help you increase the efficiency of your export and make data transfers highly personalized. Google Drive and Google Sheets, FTP/SFTP, REST and SOAP API, Dropbox, URL, and file upload can be import sources for your Magento 2 data.

Our Magento 2 extension works with multiple file formats, including CSV, ODS, XLSX, XML, JSON files. Import and export files have a certain table structure, you can compose such files from scratching using our sample file in the Master Category Import Table.

As you can see, it contains such attributes:

  • name – each category has a name and you can view it here;
  • url_path – the URL to a category;
  • 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.
  • and others that can be found in the sample Google Sheet.

As for other features available with the Improved Import Magento 2 extension, they allow setting category position and location. First of all, you can import categories by name and the 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, configure the general settings for your import job. Then select the ‘Categories’ entity to import categories to your Magento 2 website from another one. After that, you may proceed with import behavior settings and import source and file format selection.

category import

Don’t forget to map the data if needed. Run the job to see your categories import done.

Download / Buy Firebear Improved Import Magento 2 Extension

More tips from Magento 2 Cookbook.