How to export/import Magento 2 categories?

The category import & export function in Magento 2 makes it easy to add or update product information. This feature will be useful for admins, as all information will be presented in a CSV file. 

What does a CSV file consist of?

Depending on the source, the export-import Magento 2 file consists of the following categories:

  1. Source_code. There will be a row for each SKU\source.
  2. SKU. The SKU must correspond to the item in your store in order to update your Inventory Management data correctly.
  3. Status. If this value is 0, then the product is out of stock. If 1, then the product is in stock. To purchase stock from the source, the value must be 1.
  4. Quantity. To check the stock amount accessible for this SKU and source, see Quantity Information.

How to export products from Magento? 

To export categories in Magento 2, follow these steps:

Step 1. Firstly, go to System > Data Transfer > Export on the Admin sidebar.

Step 2. Choose Stock Sources for the Entity Type menu. The export will only extract data for Magento category products with an SKU.

Step 3. Then click the Continue button.

Step 4. The file will be generated and downloaded to open and edit. You need to import the file back into Magento after updating inventory amounts and product data.

product export settings

That was a guide on how to export data for all sources. If you want to export data from a specific source, you need to add one more step between Step 2 and Step 3. Here it is: 

Additional step. Use the Entity Attributes to filter the exported products for a specific source.

Enter the code for the source in the filter field for source_code.

How to import products to Magento 2?

To import categories in Magento 2, follow these steps:

Step 1. Go to System > Data Transfer > Import on the Admin sidebar.

Step 2. Then choose Stock Sources for the Entity Type menu.

The export will only extract data for products with an SKU.

Step 3. Select configurations for the Import Behavior field.

Step 4. Now select the .csv file to import.

Step 5. Click Check Data to complete the import.

product import

How to export categories in Magento 2?

To export categories in Magento 2, go to System > Data Transfer > Export. In the Entity Type menu, choose your Stock Sources, select Export File Format, and tick Fields Enclosure, if needed. Click continue. After this, Magento category products will be exported and saved to the var/export/ folder via cron job. When the Magento categories file is exported, you can open it, edit data, and import it back to Magento 2. Thus, you’ll update all the category products in bulk.

How to import Magento 2 categories in CSV?

To import Magento 2 categories in CSV, go to System > Data Transfer > Import and choose Entity Type. Choose Import Behavior and enter the allowed errors count. If you upload a CSV file, default Field and Multiple value separators are commas (,). Then upload your importing file and enter the path to the images directory.

How to extend the export functionality?

You can use our Export Products extension to simplify the data export process and make it more user-friendly. This extension will allow you to transfer data to other CRM or ERP systems without any programming skills. You will be able to export data in 6 formats such as CSV, XML, ODS, XLSX, JSON, or Custom Template formats. Besides, the module allows you to extract any required product attributes, including custom ones. You just need to select the entity you want and add fields using the popup and search option in it. Moreover, you can track the stages of data export using export statuses and export history functions. 


The Export Products extension is a part of our future all-in-one Import and Export solution. It also includes Export Customers, and Export Orders, with which you can extend default exporting features . They don’t require technical knowledge for import\export processes. Moreover, it will become less time-consuming because of presets for various tasks and more user-friendly because you will have an opportunity to use tree-structured filters.

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2024 Amasty. All Rights Reserved.