Knowledgebase

How to export and import data in PrestaShop 1.5-1.6

You can export various information from one PrestaShop installation and import it in another one (or the same one). The data is exported in CSV files which you can edit before importing them. You can export and import categories, products, customers, customer addresses, manufacturers, suppliers, etc. You can do this from the admin panel of PrestaShop.

Export Data

To export particular type of data, go to the page in the PrestaShop admin panel for managing that data and use the Export button there to export it. For example, to export products go to Catalog menu>Products sub-menu, click on the Export button on the page that opens and use the window that pops out to save on your local computer the CSV file with the exported products.

Import Data

To import data, go to Advanced Parameters menu>CSV Import sub-menu. On the page that opens you'll see a bunch of options. Before you can import the data from a CSV file you have to upload it in the PrestaShop directory on your PrestaShop hosting account. To do this click on the Add file button (in PrestaShop 1.5 it's Upload button) that's on CSV Import page and use the window that pops out to find the CSV file that's on your local computer and upload it. You can upload many CSV files. You can select which one to import with the button Choose from history (in PrestaShop 1.5 there's a drop-down menu).

On the same page there's a drop-down menu for selecting the kind of entity that you're about to import. If, for example, the selected CSV file contains product information, select Products from the Entity drop-down menu.

From the drop-down menu Language of the file you can select one of the installed languages. The information that's about to be imported will be assigned to the particular language. Keep in mind that CSV files are exported in the default language, so if the selected language is different you might want to edit the CSV file and translate the names, descriptions, etc., in the respective language.

The option ISO-8859-1 encoded file is disabled by default. Usually CSV files are UTF-8 encoded, so if you have specifically changed the encoding of the file to ISO-8859-1, then you should enable this option. By default, the Field separator option is set to a semicolon and the Multiple value separator is set to a comma. These are the separators that are most often used in CSV files. Leave them like this unless you know for sure that the separators in the CSV file that you're going to import are different. There's also an option for deleting the entities (e.g. products, categories) that are currently in the shop in which you're about to import the CSV file; the option is disabled by default. Another options that's disabled by default is the one for forcing the ID's as they are specified in the CSV file; if you leave it disabled PrestaShop will assign its own ID's. After you're ready with the options click on the Next step button.

On the next page you'll see a table that shows the headers of the CSV file and the values corresponding to those headers for each product (or category, customer, etc., depending what type of the data the file contains). At the top of the table there are some drop-down menus that show what header PrestaShop expects in the particular position. You have to make sure that they match the headers of the file. So if necessary, change the headers shown in the drop-down menus so that everything matches. When you're done click on the Import CSV data button that's in the top right corner.

Note that images are not imported. For this to happen you have to edit the URL information in the CSV file and also transfer the pictures from the PrestaShop instance from which you exported the file to the PrestaShop instance in which you imported it. For more information read the section on how to import images in PrestaShop in the tutorial on exporting and importing data.

Edit CSV Files

Before you import a CSV file in PrestaShop you may need to edit it. You can actually create your own CSV file with the information that you want to import. You can edit CSV files with a text editor (e.g. Wordpad, Notepad). Each line in the file presents the information for a particular product, category, customer or whatever kind of entity the file contains. The order in which the values are listed in the line is important. The headers determine what each value stands for. The top most line lists the headers. So, for example, if the second header is Name, then the second value in each line stands for the name of the particular product.

For more details and screenshots check out the tutorial on how to export and import products, categories, customers and other data in PrestaShop.

Was this answer helpful?

 Print this Article

Also Read