A Complete Guide on Product Import and Export in Magento 2

In  default Magento 2, admin can process some important actions more quickly and simply with import and export functions such as Advance Pricing, Products, Customers and Addresses (single file), Customer Main File and Customer Addresses.

In this blog post, we will introduce you a full guideline on how to import and export products via a CSV file so that all of you can do by yourself without depending on IT staff.

Import Products into Magento 2 Websites

To import products in Magento 2, you navigate to Admin Dashboard → System → Data Transfer → Import.


In Import Settings: you choose Products in the drop-down list of Entity Types section. Then there are many other settings apprearing for you to make configuration. 

Step 1: Prepare a CSV file including product data

As mentioned before, you can easily add products in bulk via a CSV file. Therefore, the very first thing you need to do is to prepare a standard CSV file with all neccessary information about products. Default Magento 2 supports you this issue by providing the sample file to download, which can help you follow available examples and avoid errors while filling in data.

You click “Download Sample Data” next to Entity Types section.

magento-2-import-product-download-sample Download the sample CSV file to prepare for importing products in Magento 2

The CSV file will be saved in your computer. Let’s open the file and start finishing your own product data in columns and rows of the file.

magento-2-import-product-csv-file The sample CSV file to follow


  • For product data including paths of product images, make sure that you have have uploaded the image files to the appropriate location. The default location on the Magento server is: pub/media/import.
  • The size of the CSV file does not exceed 2M.

Step 2:  Configure Import Behaviors

magento-2-import-product-behavior Import BEhavior Settings

In Import Behavior, there are 3 options for you to select dependign on your purposes to import data:

  • Add/ Update: Add new data to the existing product data for the existing entries in the database and update all fileds except for SKU. Moreover, new tax classes, new product categories and new SKUs that are specified in the CSV file are also automatically created.
  • Replace Existing Complex Data: Replace the existing data with the new ones. In case SKUs in the CSV file is similar to SKU of the existing entity, all fields are deleted and new record is created usign data in the import file.
  • Delete Entities: Delete every entity in the CSV which already exists in the database

In addition, you can also determine how the system will process when errors occur:

+ Stop on Error: the system stops importing when there are errors.

+ Skip error entries: the system skips errors and continues to import.

In  Allowed Errors Count: This setting allows you to choose the allowed maximum number of errors when importing. If the number of errors happening in the import process exceeds that maximum number you fill in this field, the system will stop importing.

In Field separators: fill in a character to separate fields. Magento accepts the default value of  comma.

In Multiple value separators:  Magento also accepts the default value of  comma.

*Note: If you want to change into another character as a separator, make sure that it has to match with the one you use in the CSV file.

Step 3: Upload the import file

magento-2-import-product-upload The import file is uploaded

You click Choose File to select the wanted import file and upload it.

For Images File Directory section: It will be used in case you have import date including paths of product images. Let’s choose one of the following options to enter into this field:

  • The path to the uploaded images on the Magento server. For example: var/import.
  • The full URL to the images on another server

Step 4: Check the import data

After you finish all above things, the last one you need to do is validate the import data by clicking Check Data button.

  • If you CSV file is free from errors, there is a message to notify validation results and Import button now appears to click . You click Import button to start importing product in the CSV file into Magento 2 website.
magento-2-import-product-check-data The data checking result
  • If your CSV file includes errors, Import button cannot be displayed for you to click and there is notification about these problems

Export Products with Attributes

Default Magento 2 also allows you to export products with selected attributes by going System → Data Transfer → Export.

magento-2-export-product Export products in Magento 2

In Entity Types: you choose Products in the drop-down list

You can see a grid table of product attributes in Entity Attributes section. By the default, the system will export all of these available attributes if you don’t perform more actions. However, you can choose to exclude unneccessary attributes by ticking in boxes before them.

magento-2-export-product-attributes Product are exported with their attributes

Then, click Continue button and as a result, you will export wanted attributes in a CSV file.

This is the full guideline to import and export products in Magento 2. Moreover, to quickly import and export product attributes into Magento 2 websites, we can try this extension: Magento 2 Import/Export Product Attributes  or other Magento 2 Import Export extensions you may take more concerns for your websites:

Some of other blog post that you can take more interests: Must-have Import/Export Product Reviews Extension for Magento 2 Site.

import export product attributes magento 2

Leave a Reply