The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

Tutorials Of 4 Simple Steps In Magento 2 Import Products

Magento 2.0 allows you to Import Products data to add or update the products, replace existing data and delete entities. This feature helps save a lot of time compared with manually configuring. Actually, almost data in Magento is contained in CSV files (Comma Separated Value file) which appears similar to Excel file but simpler. Therefore, we recommend you to become familiar with CSV files to import and export other types of data besides of products such as customer data, customer address data and product images. And the following are 4 basic steps in the instruction to do a Magento 2 import products to your store.

4 Simple Steps In Magento 2 Import Products

1. The Structure of CSV file 2. Magento 2 Import Products Steps

1. The structure of CSV file

2M maximum is often the default size of the import file. Understanding deeply the detailed description of the column in the CSV file structure is necessary for store owners when doing any Magento 2 import products. Below is a basic list of items in the CSV file:

  • sku – an ID used as a key product attribute in the Magento 2 core. It is unique for each product. SKU can contain digits and letters without spaces and is separated with underscores (_) and en dashes (-).
  • store_view_code – an associated store view code. The column will have no data if an associated store or website has a single sub-item.
  • attribute_set_code – defines the product to a specific attribute set or product template. You need to create and arrange an attribute set before importing products.
  • update_attribute_set – defines whether the product set is updated for the product during the Magento 2 import/export product.
  • product_type – the type of imported products. Use only lowercase letters (simple, configurable, grouped, etc.). You can learn about Magento product types clearly with the tutorials for beginners.
  • categories – Magento 2 product categories are different from Magento 1 ones. In this system, comma-separated category IDs are used, and full names of assigned categories, including full path, are required.
  • product_websites – an associated product website code. Use lowercase letters only (e.g., “base”).
  • name – a product name
  • description – a product description with color, shape, size,…
  • short_description – a short description of a product. Description and short description can include valid HTML tags.
  • weight – weight of a product. Always use the following format 1.00000.
  • product_online – enables or disables products. Use 1 or 0, respectively.
  • tax_class_name – a product tax class. Allows using capital letters and spaces, like in Magento 2 backend, e.g., “Taxable Goods”
  • visibility – visibility of a product, e.g., “Catalog, Search”, “Not Visible Individually” etc.
  • price – a price of a product, e.g.,. 36.000.
  • special_price – a special product price
  • special_price_from_date – the beginning date when the special price is applied, e.g., ‘2022-01-02 11:22:30’.
  • special_price_to_date – the last date when the special price is applied, e.g., ‘2022-05-02 11:22:30’.
  • url_key – an URL key of the product. If there is an empty field, a value is set up automatically based on a product name.
  • meta_title – a meta title of a product
  • meta_keywords – product meta keywords
  • meta_description – a product meta description
  • base_image – the image of the key product. It should be uploaded to /pub/media/import. For instance, the path of /sample_data/a/b/ab02-gray-0.jpg has the following structure: /pub/media/import/sample_data/a/b/ab02-gray-0.jpg. Moreover, you can use a direct URL of an image, such as
  • base_image_label – a label of a base product image
  • small_image – a name and a path related to a small product image. It should also be uploaded to /pub/media/import.
  • small_image_label – a label of a small product image
  • thumbnail_image – a name and a path associated with a thumbnail product image. The image should be uploaded to /pub/media/import as well.
  • qty – denotes the quantity of product that is in stock.

2. Magento 2 Import Products Steps

Step 1: Prepare the Data

First, you have to make your data ready.

  • On the Admin sidebar, choose System > Data Transfer > Import.
  • In the Import Settings section, set Entity Type to “Products” as you are importing product data.
  • After selecting the Entity Type, click Download Sample File. If you are prompted, click Save to start downloading the file.
  • Open to view the sample file.
  • Make sure that your CSV import file follows the sample file exactly.
  • Confirm that the size of your import file does not exceed the limit shown in the message which is usually informed to be 2M.
  • If the import data includes paths to product images, make sure that the image files have been uploaded to the appropriate location. The default location on the Magento server is pub/media/import. If the images reside on an external server, make sure that you have the full URL to the directory that contains the images.

How to Import Products in Magento 2

Step 2: Configure Import Behavior

The Import process includes many requirements, therefore, you need to configure the behaviours beforehand:

  • In the Import Behavior section, choose the action you want when importing data in the Import Behavior field: “Add/Update”, “Replace Existing Complex Data” or “Delete Entities”. Then set the following field to “Stop on Error” or “Skip Error Entries”.
  • In the Allowed Errors Count field, enter a number of errors to pause the import process.
  • In the Field separator and Multiple value separator fields, leave the default as “,” since the default separator in CSV file is a comma. How to Import Products in Magento 2

Step 3: Specify the Import File

Next, you will upload the file you want to import data from:

  • In the File to Import section, click on the Choose File button and choose your import data file, then click Open.
  • If the import data contains paths to product images, in the Images File Directory field, enter:
    • The path to the uploaded images on the Magento server. For example: var/import.
    • Or the full URL to the images on another server. For example: Import Products in Magento 2 from file

Step 4: Check the Data and Finish the Importing

To complete the import process, the imported data needs to be checked:

  • In the upper-right corner, click Check Data and wait for the process to complete.
  • If the file is valid, click the Import button shown in the Validation Results. Contrarily, correct the problem informed in the message and try again.
  • When the importing completes, there will be a message to notify you.

3. How to view the Import History

Now, all of the import history can be viewed in the backend:

  • On the Admin sidebar, choose System > Data Transfer > Import History.
  • The import history detail table will show all the action of import/export for you to track. Import Products in Magento 2

4. How to import Magento 2 product images

To import product images in Magento 2, you can follow these steps:

  1. Prepare your image files: Ensure that your product images are properly organized and ready for import. Make sure each image corresponds to the correct product SKU or identifier.

  2. Upload your image files to the server: Connect to your Magento 2 server via FTP or use the Magento Admin Panel to upload your product image files. Place the images in the appropriate directory, typically located in the “pub/media/import” folder.

  3. Create a CSV file with image references: Prepare a CSV (Comma-Separated Values) file that includes the necessary product information, including image references. The CSV file should have columns such as “sku” (product SKU) and “image” (path to the image file relative to the “pub/media/import” directory).

  4. Configure the import settings: In the Magento Admin Panel, navigate to “System” -> “Data Transfer” -> “Import.” Select “Products” as the entity type and choose the CSV file you created. Configure the import settings, mapping the CSV columns to the corresponding Magento product attributes.

  5. Map image import behavior: In the import settings, locate the “Images File Directory” field and set it to “/pub/media/import” (or the appropriate path for your server setup). This ensures that Magento searches for images in the correct directory during the import process.

  6. Run the import: Save the import settings and click the “Check Data” button to validate your CSV file. If there are any errors, address them accordingly. Once the validation is successful, click the “Import” button to start the import process. Magento will import the product data along with the associated images.

  7. Verify imported images: After the import completes, go to the product catalog in the Magento Admin Panel and check the product details. Verify that the product images are properly associated with the corresponding products.

By following these steps, you can successfully import product images in Magento 2 using a CSV file and ensure that your products are displayed with the correct images on your e-commerce store.

The bottom line

Product Import in Magento 2 is no longer a manual, time-consuming task, but can become a simple and quick process, if you follow the above guide. You can also read more from the below related topics or discover the solution to import and export CMS, as well as tools to import and export categories for your Magento store. That’s all for today, and we’d love to hear more from you!

Product Options

Product Options for Magento 2

Magento 2 Product Options supports store owners to assign options to multiple products quickly.

Check it out!

Related topics

Looking for
Customization & Development Services?

8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.

Get free consultant
development service

    Explore Our Products:

    People also searched for


    Stay in the know

    Get special offers on the latest news from Mageplaza.

    Earn $10 in reward now!

    Earn $10 in reward now!

    go up