1. Documentation /
  2. Product CSV Importer and Exporter

Product CSV Importer and Exporter

WooCommerce has a built-in product CSV Importer and Exporter which can accessed from the All Products > Products page. You can import, export, or update hundreds or thousands of products in your WooCommerce store with a single CSV. This tool supports most product types, including variations.

Locate the Import / Export Tool

↑ Back to top

The “Import” and “Export” options are placed right next to the “Add New” Product button.

  • First-time store owners get started more quickly by exporting and importing products during setup.
  • Existing store owners can update tens or hundreds of products with new info or place them on sale, or sync multiple storefronts.
Note: If you are using the Product CSV Import Suite paid extension, refer to documentation at: Product CSV Import Suite.

Create your CSV

↑ Back to top

What CSV editors do you recommend?

↑ Back to top

We recommend using:

If possible, avoid Microsoft Excel due to formatting and character encoding issues.

How to create the CSV?

↑ Back to top

To import new products or update existing products, you need a CSV containing your product information. You can:

Note: If using the built-in WooCommerce Product CSV Importer and Exporter tool to export a CSV, it already follows the schema and is ready to use.

If using the blank and formatted CSV file, it also follows the schema; just be sure to enter the info as instructed at Product CSV Import Schema.

General guidelines

↑ Back to top
  • CSVs should be in UTF-8 format.
  • Dates should be defined for the store’s local timezone.
  • Use 1 or 0 in your CSV, if importing a Boolean value (true or false)
  • Multiple values in a field get separated with commas.
  • Wrapping values in quotes allows you to insert a comma.
  • Prefix the id with id: if referencing an existing product ID. No prefix is needed if referencing an SKU. For example: id:100, SKU101
  • Taxonomy term hierarchy is denoted with >, terms are separated with commas.
  • Draft products are not exported, only published and privately published products.
  • It is not possible to assign a specific post ID to product on import. Products will always use the next available ID, regardless of the ID included in the imported CSV.

Images

↑ Back to top
  • Images need to be pre-uploaded or available online to import to your store.
  • External URLs are supported and imported into the Media Library if used, provided the images are directly accessible and not behind a redirect script (as happens on some cloud storage services).
  • You can define the filename if the image already exists in the Media Library.

Import

↑ Back to top

Adding New Products

↑ Back to top

First-time and existing store owners using WooCommerce can use the CSV to add new products with one upload.

1. Go to All Products > Products.

2. Select Import at the top. The Upload CSV File screen displays.

3. Select Choose File and the CSV you wish you use.

4. CSV delimiter (Advanced option): Generally CSV elements are separated by a comma. If you are using a different delimiter in your file, you can set it here.

5. Click on the Continue button

6. The Column Mapping screen displays and WooCommerce automatically attempts to match or “map” the Column Name from your CSV to Fields.

7. Use dropdown menus on the right side to adjust fields or indicate ‘Do not import.’

8. Any unrecognized columns will not be imported by default.

9. Once you are ready, click on the ‘Run the Importer‘ button.

10. Wait until the Importer is finished. Do not refresh or touch the browser while in progress.

Update Existing Products

↑ Back to top

Store owners can use the CSV Importer tool to update existing products with new info, e.g., Adding a brand, changing a tax class, bulk-update for a special sale or event, etc.

1. Make a CSV file as indicated in the Create Your CSV section, using the IDs and/or SKUs of products you wish to update. The importer uses the ID and/or SKU to auto-match and auto-update whatever info you enter on each line.

2. Navigate to All Products > Products.

3. Click on the Import button at the top. The Upload CSV File screen displays.

4. Select Choose File and the CSV you wish you use.

5. Tick the checkbox to Update Existing Products.

6. Click on the Continue button.

7. The Column Mapping screen displays and WooCommerce automatically attempts to match or “map” the Column Name from your CSV to Fields.

8. Use dropdown menus on the right side to adjust fields or indicate ‘Do not import.

9. Any unrecognized columns will not be imported by default.

10. Click on the Run the Importer button.

11. Wait until the Importer is finished. Do not refresh or touch the browser while in progress.

Converting existing Simple Product to Variable Product

↑ Back to top

Store owners can use the CSV Importer tool to convert the existing simple product to a variable. To do that, please follow the below steps:

  1. Create a simple product that has a price and SKU.
  2. Export product via built-in CSV Exporter on the All Products page.
  3. Open the CSV file and convert the simple product to a variable by following the below steps:

In this example, we will convert a simple product into a variable product with 1 attribute (size) and 2 variations:

  1. Add 2 new rows
  2. Add 4 new columns after the last column:
    • Attribute 1 name
    • Attribute 1 value(s)
    • Attribute 1 visible
    • Attribute 1 global

3. Add Size attribute, so our new 4 columns look as follows:

4. Change the type of the product from simple to variable and add type variation to variation rows (2 new rows that you created).

5. Add SKU to variation rows.

6. Give it a name as well. It looks like this in our example:

7. Update the other columns as well (and any other columns if needed):

8. Important: Add SKU to all fields in the Parent column – this is to map the parent product with its variations:

9. Save a new CSV file.

10. Import the updated CSV file back to the site using the built-in CSV Importer

11. Select to update existing products option before running the import since we want to update the existing product on the site:

12. Click on the “Continue” button to proceed with import (nothing to be mapped).

13. You will see the following which is expected:

14. Navigate to the product. You will see that it is now variable and has 1 attribute added but no variations were created. Note that Used for variations checkbox is not selected. This is also expected:

15. Open the CSV file again (the one where you already created rows for variations) and delete the parent product row. Leave variations rows without changes:

16. Save the updated CSV file.

17. Next, import the updated CSV file to the site but this time don’t select the box next to Update existing products:

18. Proceed with import (no fields need to be mapped). You should see that variations have been imported:

19. After the import is completed, navigate to the product. It should now be a variable product with variations:

Export

↑ Back to top

Store owners wishing to export their current catalog of products for any reason can generate a CSV using the built in Product Importer/Exporter tool.

1. Navigate to All Products > Products.

2. Click on the Export button at the top. The Export Products screen will be displayed.

3. Select to Export All Columns. Or select which columns to export by using the dropdown menu.

4. Select to Export All Products. Or select which product types to export by using the dropdown menu.

5. Select to Export All Categories. Or select which categories to export by using the dropdown menu.

6. Tick the box to Export Custom Meta, if you need this info. Metadata on your products is typically from other plugins. Metadata columns are exported following the meta:-prefix standard detailed above in the importer mapping section. By default, no additional metadata is exported.

7. Click on the Generate CSV button and wait for the export to finish.

8. Exit the exporter.

Product CSV Import Schema

↑ Back to top

This is the schema used for the built-in CSV importer and exporter in WooCommerce. You can review the schema in full-page on our GitHub repository.

CSV Column NameMaps to product propertyExampleNotes
IDid100Defining this will overwrite data for that ID on import.
Typetypesimplevariation, virtualProduct Type. Valid values: simple, variable, grouped, external, variation, virtual, downloadable. Multiple types can be used CSV separated.
SKUskumy-skuRequired. Auto-generated if missing.
NamenameMy Product NameRequired.
Publishedstatus1 1 for published, 0 for private, -1 for draft.
Is featured?featured11 or 0 (1 for true, 0 for false)
Visibility in catalogcatalog_visibilityvisibleSupported values: visiblecatalogsearchhidden
Short descriptionshort_descriptionThis is a product.
DescriptiondescriptionThis is more information about a product.
Date sale price startsdate_on_sale_from2013-06-07Date (start of day) or leave blank.
Date sale price endsdate_on_sale_to2013-06-07Date (end of day) or leave blank.
Tax statustax_statustaxableSupported values: taxableshippingnone
Tax classtax_classstandardCan use any existing tax class.
In stock?stock_status11 or 0 (1 for true, 0 for false)
Stockmanage_stock / stock_quantity20Numeric stock level enables stock management. parent can be used for variations. Blank = no stock management.
Low stock amountlow_stock_amount3Empty or a number
Backorders allowed?backorders11, 0, or notify (1 for true, 0 for false)
Sold individually?sold_individually11 or 0 (1 for true, 0 for false)
Weight (unit)weight100Parse only numbers.
Length (unit)length20Parse only numbers.
Width (unit)width20Parse only numbers.
Height (unit)height20Parse only numbers.
Allow customer reviews?reviews_allowed11 or 0 (1 for true, 0 for false)
Purchase Notepurchase_noteThanks for buying it buddy.
Sale pricesale_price20.99Sale price.
Regular priceregular_price24.99Regular price.
Categoriescategory_idsCategory 1, Category 1 > Category 2CSV list of categories. > used for hierarchy.
Tagstag_idsTag 1, Tag 2CSV list of tags.
Shipping classshipping_class_idNameName of shipping class
Imagesimage_id / gallery_image_idshttp://somewhere.com/image.jpg, http://somewhere.com/image2.jpgFirst is the featured image.
Download limitdownload_limit1n/a or a limit.
Download expiry daysdownload_expiry1n/a or a day limit.
Parentparent_idid:100SKU-1Set parent ID. Used for variations. Can be just a numeric ID e.g. id:100 or a SKU. Export will use SKU when possible.
Grouped productschildrenid:100, id:101SKU-1, SKU-2List of IDs. Can be just a numeric ID e.g. id:100 or a SKU. Export will use SKU when possible.
Upsellsupsell_idsid:100, id:101SKU-1, SKU-2List of IDs. Can be just a numeric ID e.g. id:100 or a SKU. Export will use SKU when possible.
Cross-sellscross_sell_idsid:100, id:101SKU-1, SKU-2List of IDs. Can be just a numeric ID e.g. id:100 or a SKU. Export will use SKU when possible.
External URLproduct_urlhttps://mercantile.wordpress.org/product/wordpress-pennant/Product external URL.
Button textbutton_textBuy on the WordPress swag store!Custom product “buy” button.
Positionmenu_order1Menu order, used for sorting.
Attribute 1 nameattributesColorLooks for global attribute or uses text if not found. Include as many as needed. “Used for variations” is set automatically.
Attribute 1 value(s)attributesBlue, Red, GreenList of values. Variations only need 1 value. First is used if multiple get provided.
Attribute 1 defaultdefault_attributesBlueDefault value for variable products.
Attribute 1 visibleattributes11 or 0. (1 for true, 0 for false) Mapping screen labels this as “Attribute Visibility”
Attribute 1 globalattributes11 or 0. (1 for true, 0 for false) Mapping screen labels this as “Is a global attribute?”
Download 1 namedownloadsDownload 1
Download 1 URLdownloadsurl.zip

FAQ

↑ Back to top

Is it possible to add custom import columns?

↑ Back to top

Yes. Feel free to visit the WooCommerce repo at GitHub to see the custom code at Adding Custom Import Columns. Be aware that is Developer level info for which we provide no assistance under our Support Policy.

Is it possible to add custom export columns?

↑ Back to top

Yes. Feel free to visit the WooCommerce repo at GitHub to see the custom code at Adding Custom Export Columns. Be aware that this is Developer level info for which we provide no assistance under our Support Policy.

Why aren’t all my products exported?

↑ Back to top

Previous to WooCommerce 3.6.5, only products with a status of ‘publish’ or ‘private’ were exported, not those in ‘draft.’ If you want to change that, there’s a filter you can use, but this would require custom coding, which we can’t provide assistance with.

Why aren’t all of my products imported?

↑ Back to top

Previous to WooCommerce 3.6.5, only products with a status of ‘publish’ or ‘private’ were imported, not those in ‘draft.’ As of WooCommerce 3.7, CSV product import now allows true/false values for the published field, as well as the original 0 (private), -1 (draft), 1 (publish) values.

Permission error when importing?

↑ Back to top

Are you seeing the following permission error when importing your CSV file?
Sorry, this file type is not permitted for security reasons.

When an import file contains HTML the file type can be mis-detected by WordPress on some servers. One workaround is to add the following line to your wp-config.php file:
define( 'ALLOW_UNFILTERED_UPLOADS', true );

For security reasons, you should only enable this temporarily for the time of import, and then remove it again from the configuration file.

Alternatively, instead of Choose a CSV file from your computer, you can first upload the CSV file to your website’s upload directory via FTP or your host’s admin panel file manager. Then, via Advanced Options, specify the location of that file for upload:

How to increase the CSV import maximum size?

↑ Back to top

The Maximum size value is set at the server level. To increase the maximum file size, please contact your hosting company. As a workaround, you can split the CSV into multiple parts to upload separately.

How to import a large product database?

↑ Back to top

When stores need to import a large number of products, the performance of your server becomes crucial. To ensure a smooth import process when using a CSV file, consider breaking it into smaller batches. This reduces the chances of errors and allows for easier troubleshooting if issues occur.

For handling extensive imports, we recommend using the Product CSV Import Suite. This extension supports the import of thousands of products, including complex ones and custom data from extensions like Product Vendors, Brands, Google Product Feed, and more.

Questions and Support

↑ Back to top

Do you still have questions and need assistance? 

  • Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on Woo.com, and Jetpack/WordPress.com customers.
  • If you are not a customer, we recommend finding help on the WooCommerce Support Forum or hiring a WooExpert agency. They are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about WooExpert agencies.

Questions and Support

↑ Back to top

Do you still have questions and need assistance? 

  • Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on Woo.com, and Jetpack/WordPress.com customers.
  • If you are not a customer, we recommend finding help on the WooCommerce Support Forum or hiring a WooExpert agency. They are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about WooExpert agencies.