Import WooCommerce Products from CSV / XML
Import WP’s WooCommerce add-on allows you to easily import WooCommerce products from XML / CSV files, allowing you to import products from simple to variable product with as much information as required.
All examples shown in this article can be imported using this sample CSV file, containing the minimum columns needed to Import WooCommerce Products with external, grouped, variable and variation product types.
Table of Contents
Import WooCommerce Products data
The Import WP WooCommerce Add-on adds a new importer type labelled “WooCommerce Products” to the Create Importer screen. Using the WooCommerce product importer template will add all the necessary fields to import WooCommerce product data.
The WooCommerce product importer template replaces default post fields with a new “Product fields” section, where all core product data is set, followed by other section with fields that related to the Product data tabs found on WooCommerce’s edit product screen each with hidden fields can be toggled via the “Enable Fields” button.
Importing WooCommerce Simple Products
Simple products are WooCommerce’s easiest and most common type of product to import, at their core they can be imported with just a name and price as shown in the following example CSV.
Name | Price |
---|---|
Simple Product 1 | 10.99 |
Simple Product 2 | 12.99 |
Simple Product 3 | 14.99 |
The “Product Name” field is located via the “Product Fields” section, setting the product price is done via the “Regular Price” field found under the “Pricing” section.
When importing WooCommerce simple products you do not need to specify the product type as this defaults to “simple”, however the “Product Type” field can be enabled via the “Enable Fields” button.
With only the name and price set, running the importer will import simple products into WooCommerce that can be viewed in the store and added to the cart / purchased.
Using this as a base to Import WooCommerce simple products, you can add as much information and media as required.
Importing WooCommerce Grouped Products data
A grouped product gives you a way to display a list of simple products that can all be easily added to the basket from a single product page, extending the example simple product CSV with a product type, SKU and grouped products column gives you all the information required to import grouped products to WooCommerce.
Name | SKU | Product Type | Price | Grouped Products |
---|---|---|---|---|
Simple Product 1 | simple-one | simple | 10.99 | |
Simple Product 2 | simple-two | simple | 12.99 | |
Simple Product 3 | simple-three | simple | 14.99 | |
Grouped Product | group-one | grouped | simple-one, simple-two |
Similar to importing simple products, the only extra requirements to import grouped products are to enable the “Product type” field and set this to “grouped” or read the product type from the CSV or XML file.
To create a link between the grouped product and simple products, enable the “Grouped Products” field located under the “Linked Products” section, the value of this field should be a list of simple product ID’s or SKU’s, depending on the value set on the “Grouped Products Type” field.
With the “Grouped Products Type” field set to Product SKU, the list of grouped products will need to reference existing product SKU’s, this means we need to populate the “Product SKU” field located under the “Inventory” section.
When the Product SKU field is set, the importer will use this by default as the unique identifier of each product to identify if the product exists and if it should be updated or inserted. This can be changed via the permissions step if required.
Importing WooCommerce External/Affiliate Products data
External products are very similar to simple products, the only difference is they do not display an add to cart button but instead display a button linking to an external URL, adding a Product URL column to our example CSV allows this to be set.
Name | SKU | Product Type | Price | Product Url |
---|---|---|---|---|
Simple Product 1 | simple-one | simple | 10.99 | |
Simple Product 2 | simple-two | simple | 12.99 | |
Simple Product 3 | simple-three | simple | 14.99 | |
Grouped Product | group-one | grouped | ||
External Product 1 | external-one | external | 10.99 | https://importwp.com/integrations/import-export-woocommerce-plugin/ |
Enabling the “Product URL” field under the “Product Fields” section will toggle the “Product URL” field, allowing you to set the products external URL. Leaving the “Product URL Button Text” field empty will set the button text to the default.
Importing WooCommerce Variable Products and Product Variations data
Variable products in WooCommerce are used to display a list of variations on a product, variable products are linked to their variations via attributes, a common example of this is T-Shirt size or Colour. Adding the Parent and colour columns onto the end of our example CSV.
Name | SKU | Product Type | Price | Parent | Colour |
---|---|---|---|---|---|
Simple Product 1 | simple-one | simple | 10.99 | ||
Simple Product 2 | simple-two | simple | 12.99 | ||
Simple Product 3 | simple-three | simple | 14.99 | ||
Grouped Product | group-one | grouped | |||
External Product 1 | external-one | external | 10.99 | ||
Variable Product 1 | variable-one | variable | red,blue | ||
Product Variation 1 | variation-one | variation | 10.99 | variable-one | red |
Product Variation 2 | variation-two | variation | 12.99 | variable-one | blue |
Importing WooCommerce variable products and product variations require only a couple extra columns in the CSV file, enabling the “parent” field in the “Advanced” section will allow you to create a relationship between the parent variable product and its child variations.
With the parent and child relationship created, next is to link all required product attributes using the “Product Attributes” section, setting the attribute name / terms, if the attribute in question is found via “Products > Attributes” set the “Is Global?” field to yes, otherwise leave as no, and set the “Used for variations?” to yes.
Import WooCommerce products with images
WooCommerce product images are imported using the Product gallery section along with any optional metadata such as image title or Alt attribute as shown in the example CSV file under the images and image title column.
Name | Price | Images | Image Title |
---|---|---|---|
Simple Product 1 | 10.99 | https://picsum.photos/id/1/550/500.webp, https://picsum.photos/id/9/550/500.webp | Image Title 1, Image Title 9 |
Simple Product 2 | 12.99 | https://picsum.photos/id/2/550/500.webp | Image Title 2 |
Simple Product 3 | 14.99 | https://picsum.photos/id/3/550/500.webp | Image Title 3 |
Importing WooCommerce products with images is accomplished via the “Product Gallery” section, this section is very similar to the default Import WP attachment section, allowing you to import product images from Remote URL’s, Local filesystem, or FTP server.
Multiple images can be imported by separating each image URL using a comma delimiter, this is the same for importing any image meta fields.
Set the location field to the “Images” column, setting the “Is featured?” option to yes will allow the first image downloaded to be set as the main product image.
Importing product image meta information can be enabled via the “Enable Meta” field, setting this to yes will display the image meta fields allowing you to set the image “Alt Text” and “Title Text” attributes.
Import WooCommerce products categories and taxonomies
Product categories, tags and any custom taxonomies can be imported using the Taxonomies section, expanding the example CSV with the Tags and Categories columns allows us to import multiple tags and categories to each product.
Name | Price | Tags | Categories |
---|---|---|---|
Simple Product 1 | 10.99 | Simple | Products > Simple |
Simple Product 2 | 12.99 | Simple, Product 2 | Products > Simple |
Simple Product 3 | 14.99 | Simple, Product 3 | Products > Simple |
Clicking the “Add Row” button at the bottom of the “Taxonomies” section create a new row of fields, we need one row for each taxonomy being imported, selecting the “Taxonomy” being imported, and setting the “Terms” field with the list of tags or categories.
In the example CSV product categories are formatted in a parent child hierarchy separated by a “>”, setting the “Enable Hierarchy” field to yes will enable the taxonomy terms to be imported hierarchically.