Data for all product types can be imported into the store. In addition, you can import products, advanced pricing data, customer data, customer address data, and product images. Import supports the following operations:
The size of the import file is determined by the settings in the
php.ini file on the server. The system message on the Import page indicates the current size limit. The default size is 2MB.
Special characters (such as the equal sign, greater and less than symbols, single and double quotes, backslash, pipe, and ampersand symbols) can cause problems during data transfer. To ensure that such special characters are correctly interpreted, they can be marked as an escape sequence. For example, if the data includes a string of text such as
code=”str2”, choosing to enclose the text in double quotes ensures that the original double quotes are understood to be part of the data. When the system encounters a double set of double quotes, it understands that the outer set of double quotes is enclosing the actual data.
When importing product data, new product data is added to existing product data entries in the database. All fields except SKU can be updated through import. All existing product data is replaced with the imported new data. Exercise caution when replacing data. All existing product data will be completely cleared and all references in the system will be lost.
Step 1: Prepare the Data
On the Admin sidebar, go to System > Data Transfer > Import.
Under Import Settings, set Entity Type to one of the following:
Customers and Addresses
Customers Main File
Click Download Sample File.
Locate the export file at the downloads location for your web browser and open the file.
Open Download Sample File
The sample file includes column headings with placeholder data for example product types.
View Sample File
Examine the structure of the sample file and use it to prepare your CSV import file, making sure that the column headings are spelled correctly.
Verify that the size of your import file does not exceed the limit shown in the message.
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 Commerce server is:
If the images reside on an external server, make sure that you have the full URL to the directory that contains the images.
Step 2: Choose the Import Behavior
Set Import Behavior to one of the following:
Add/Update(For products, you can update all fields except SKU through import.)
To determine what happens when an error is encountered when importing data, choose one of the following:
Stop on Error
Skip error entries
In the Allowed Errors Count field, enter the number of errors that can occur before the import is canceled.
The default value is 10.
Accept the default value of a comma (
,) for the Field separator.
Accept the default value of a comma (
,) for the Multiple value separator.
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.
If you want to enclose any special characters that might be found in the data as an escape sequence, select the Fields Enclosure checkbox.
Step 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 Commerce server where uploaded images are stored.
Starting with the Adobe Commerce and Magento Open Source
2.3.2release, the path specified in the Images File Directory concatenates for import to the images base directory:
<Magento-root-folder>/var/import/images. For example, place the
product_imagesfiles in the
<Magento-root-directory>/var/import/images/product_imagesfolder. The import images base directory can be configured in the
\Magento\ImportExport\etc\config.xmlfile. If the Remote storage module is enabled, import files to the
To learn more about importing product images, see Importing Product Images.
File to Import
Step 4: Check the Import Data
In the upper-right corner, click Check Data.
Wait a few moments for the validation process to complete.
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.
The import process continues to the end of the data, unless an error is encountered.
If an error message appears in the Validation Results, correct the problem in the data and import the file again.
URL Key Already Exists
A message appears when the import is complete.
|Add/Update||New product data is added to the existing product data for the existing entries in the database. All fields except
New tax classes that are specified in the import data are created automatically.
New product categories that are specified in the import file are created automatically.
New SKUs that are specified in the import file are created automatically
Note: For products, you can update all fields except SKU through import.
|Replace||The existing product data is replaced with new data.
Important: Exercise caution when replacing data because the existing product data will be completely cleared and all references in the system will be lost.
If a SKU in the import data matches the SKU of an existing entity, all fields, including the SKU, are deleted and a new record is created using the CSV data. An error occurs if the CSV file references a SKU that does not exist in the database. You can Check Data to display error.
|Delete||Any entities in the import data that already exist in the database are deleted from the database.
Delete ignores all columns in the import data, except for SKU. You can disregard all other attributes in the data.
An error occurs if the CSV file references a SKU that does not exist in the database. You can Check Data to display error.