Skip to content Skip to main navigation Skip to footer

How to import products into Magento 2 – Part 1: Simple, Virtual, Downloadable

Besides creating one by one product by the normal way of Magento, you can create many products at the same time with the CSV import file to save time and cost.

The first series is a guide about import simple, virtual, downloadable products.

1. Prepare the Data

  • Go to Admin sidebar, choose System > Data Transfer > Import.
  • Set Entity Type to “Products” (to choose import data for the product)
  • After selecting the Entity Type, click Download Sample File to download the sample file for product data.
  • Open to view the sample file.
  • Create a new file and keep some required fields follow this file: 
    • SKU: Sku of product
    • ATTRIBUTE_SET_CODE: code of attribute set to create product
    • PRODUCT_TYPE: in this case is simple, virtual, downloadable
    • PRICE
    • CATEGORIES: includes the path to each sub-category, the categories are separated by a “,”. For example, when we set the category to “Default Category / Gear, Default Category / Gear / Fitness Equipment”, there will be 2 categories that the product is assigned to, namely Gear and Fitness Equipment. Each “/” sign represents 1 level of the category and the first category is the name of the root category
    • WEIGHT (require with the simple product)
  • If you want to add other attributes in the import file, create a new column, the header will be the attribute code:
    • Product_websites: to show product on the frontend of the website

A part of the CSV import file will see like that:


  • Confirm that the size of your import file does not overcapacity that usually informed to be 2M.
  • Make sure that the image files have been uploaded to the appropriate location If the import data includes paths to product images. The default location on the Magento server is pub/media/import. 

2. Choose option for the Import

  • Set Import Behavior to one of the following:
    • Add/Update (For products, you can update all fields except SKU through import.)
    • Replace
    • Delete
  • Process when an error is encountered when importing data, choose one of the following:
    • Stop on Error
    • Skip error entries
  • Enter the number In the Allowed Errors Count field. The default value is 10.
  • Field separator: Accept the default value of a comma (,)
  • Multiple value separator: Accept the default value of a comma (,)
    In a CSV file, a comma is the default separator. To use a different character, make sure that the data in the CSV file matches the character that you specify.
  • Select the Fields Enclosure checkbox

3. Identify the Import File

  • Click Choose File to select the file to import.
  • Find the CSV file that you prepared to import and click Open.
  • In the Images File Directory field, enter the relative path to the location on the Magento server where uploaded images are stored.

4. Check the Import Data

  • click Check Data on right top screen
  • If the import data is valid, the following message appears: File is Valid. If the file is valid, click Import.
    Otherwise, correct each problem with the data that is listed in the message, and try to import the file again.

Express your love if this article is helpful.

Have more questions? Contact us if we can help!