Import products in Magento

Learn how to import products in Magento using CSV files

It is rather inconvenient to manually add a large number of products at once to a Magento installation. Inserting products one by one will take a long time especially when you have hundreds or thousands of products. In such cases you need an automatic way to add all those products to your Magento online store. We will address all steps you need to take in order to achieve a successful import.

First, access your Magento administrator backend and go to Catalog -> Categories.

Create all product categories you will need. You can do so by filling the form displayed below:

When you fill the form with all the information you like click the Save Category button.

Bear in mind that at this point you should make note of the newly created category IDs. It would be best to save them in a simple text file as you will need them for the import. The category ID will be displayed upon saving the category.

If you plan to have additional attributes for the products you are importing you will need to create those via Stores menu > Product under the Attributes section. You can use this functionality to add all custom attributes that are not present by default in a standard Magento installation. Note also that you can add additional attributes later at the moment you are creating a sample product. It is up to you whether to create the attributes before that or at the point you are creating the first product.

The next step is to manually add a product to your Magento installation. You will later export this product and use it as a template for importing the large batch. Make sure you include all attributes you will use for the products you are going to import in the sample product.

Once you create the new product and save it it will appear in the products list for your Magento store.

You are now ready to make the sample export that you will use as a template. In the Magento administrator area go to System menu > Data transfer section > Export. This would redirect you to a new page where you should select Products from Entity Type Dropdown and CSV from Export File Format.

Now you should exclude the unnecessary attributes from the list by selecting them and then click on Continue from the bottom of the page.This will save a new file on your computer with a name similar to catalog_product_YYYYMMDD_randomnumber.csv .The file will include columns for each of the attributes you have defined for your products. Open it in a spreadsheet program (MS Excel, Open Office Spreadsheet) and add the products you would like to import. Make sure you are copy/pasting the corresponding attributes in the correct columns. Also here is when you will have to add the category IDs. Use the IDs from the text file you saved earlier and put the corresponding category ID for the products you are adding.

Once you have accomplished the above go back to the Magento administrator area and go to System menu > Data transfer section > Import. Now select Products from the Entity Type dropdown. After that select Products from Entity Dropdown, and Add/Update from Import Behaviour dropdown. Now upload the CSV file by clicking on the Browse button next to Select File to Import.  If you have added images, you should also specify the path on the server where you uploaded them. Add the corresponding path to the Images File Directory section.

When ready click on the Check data button. If there are no issues or error with the import, a File is vaild! message and Import button would appear.

To initiate the process click on the Import button. When the import completes you will get the Import successfully done message.