Logo
Logo

October 11, 2024

How To Import WooCommerce Variable Products From CSV

Having trouble finding a reliable tool to import WooCommerce variable products from CSV? 

If you have hundreds of variable products that you need to upload to WooCommerce, it can be a tedious job should you choose to upload them manually. Manually uploading each product takes a lot of time and effort. While WooCommerce has a built-in product import tool that supports bulk import, it doesn’t work well with variable products. 

In this article, we will introduce you to the best possible way to bulk upload variable products to WooCommerce from CSV files. With WP All Import, you can easily upload WooCommerce variable products from CSV, in just minutes! 

What Are WooCommerce Variable Products?

In simple words, variable products are products that come with different variations. The variations are usually size, color, material, and other certain attributes. 

For example, a T-shirt that comes in different sizes (small, medium, large, extra-large, etc.) is considered a variable product. 

Variable Product Example with Sizes

On the other hand, simple products only have one version. For example, an IKEA kitchen cabinet that doesn’t offer any color, size, or material variation is a simple product. 

Simple Product Example

Create a CSV File With Variable Product Data

Before importing the CSV file with variable product data, you need to create the file accordingly to make the import seamless. 

If you want to group the variable products based on their SKUs, make the CSV file in a way that it includes all the product variations under the parent product. You can do this by giving all the variations the same parent SKU as the parent product. 

Define Parent SKU In Import File

You can also do this by having the exact same product name for all variations, but you may not want to do that all the time for marketing and branding purposes. 

You can also have a unique value for each product variation that is the same for each variation, but unique for each product. 

For the rest of the columns, simply have regular values like descriptions, prices, images, etc. 

How To Import WooCommerce Variable Products From a CSV File

WP All Import is the best plugin to bulk import WooCommerce variable products from CSV files. It is easy-to-use, and fast. If you have thousands of variable products that you need to upload to your WooCommerce store, there is no better alternative than WP All Import. 

It comes with a plethora of solutions to import data to WooCommerce sites from CSV and XML files. With its simple drag and drop interface, you can use WP All Import to upload a large number of products to your WooCommerce store. 

The key features of WP All Import includes: 

  • Import variable products in WooCommerce.
  • Import product data from both XML and CSV files without any hassle.
  • Use the simple drag-and-drop interface to import your data.
  • Schedule imports to automatically add new products from your CSV and XML files.
  • Customize the code if you have a custom website.
  • Apply filter rules to import specific subsets from your CSV file. 

Now let’s get into how to use this convenient tool to import WooCommerce variable products from CSV files! 

1. Start a New Import and Upload Your Variable Product CSV File

To start a new import, navigate to All Import > New Import

You’ll get three options to import your variable products. You can either upload or download a CSV file, or simply use an existing file that you used before. 

Create a New Import in WP All Import

‘Upload a file’ lets you upload a CSV file from your computer, while ‘Download a file’ allows you to provide a Google Sheets link. However, you need to make sure the link is public. 

Alternatively, you can choose to work with an existing file.

You can add new items to your WooCommerce store, or update existing items. For this tutorial, we’ll choose to add new items. 

Once you are done loading your CSV file, choose WooCommerce Products as the import type from the drop down list and click Continue to Step 2

Define Post Type and Continue to Next Step

2. Review Variable Product Data and Apply Filters

This will take you to the Review Import File screen. You can review the data you want to import, as well as use filters to import only specific variable products. 

If you don’t want to use filters, the objective of reviewing the import file is to simply check whether the data looks alright and there’s no missing information. 

If you need to use filters, follow these simple steps: 

Step 1: Select an Import Element

Select the import file column you want to apply the filter for. In the following example, we choose Image_URL as the element to import products with valid images. 

Select Element for Filtering

Step 2: Add a Filter Rule

In the Rule selection box, you can choose the rule you want to use for the filter. We choose is not empty in this example, as we want to import the products where the Image_URL element has data. 

Add Filter Rule in Manage Filtering Options

You also need to specify a Value for most filters. However, for the example filter, a Value is not necessary. 

Click the Add Rule button. 

Step 3: Apply Filters to XPath

You’ll then see the new filter in the lower section. As the uploaded file is stored outside the WordPress database, the filters won’t automatically apply. Click Apply Filters to XPath to apply the filter.

Apply Filters in Manage Filtering Options

Your filter will then be applied to your import. 

Point to be noted, you can use multiple filter rules if necessary. If you choose more than one filter rule, you can connect them using the logical operators AND(&&) and OR(||). 

The AND(&&) operator filters out the products that satisfy both rules, while the OR(II) operator filters out the elements that satisfy either of the rules. 

Here’s an example where we filter products that come with images, and cost more than 50. 

Manage Filtering Options with Applied Filters

Once you are done reviewing the data and applying filters, click Continue to Step 3

Review Import File WP All Import

3. Map Import File Data to the Appropriate WooCommerce Product Fields

You’ll land on the Drag & Drop screen. This will allow you to build and configure the template to import variable products. The drag & drop mapping interface makes it very convenient to smoothly complete the import process, even for beginners. 

You can drag and drop the import elements from the right of the screen to the appropriate import fields on the left. 

Let’s look at the different panels available to map WooComemrce product data. 

Title and Description Section

Map the title and description for your WooCommerce variable products. 

Drag and Drop to Map Import Fields WP All Import

WooCommerce Add-On Section

This is the most important panel in the WooCommerce variable product import. Expand the WooCommerce Add-On section next. 

As you are importing variable products, select Variable Product as Product Type in the dropdown list at top. The interface here will look familiar to when you manually add a new product in WooCommerce. This makes the whole mapping process easier as you don’t have to learn a completely new interface. 

Select Variable Product in WooCommerce Add-On

You’ll then have to configure the following three tabs: 

  • General Tab: To specify the price
  • Attributes Tab: To specify the variation attributes
  • Variations Tab: To specify how to link multiple variations from your file

There are some other tabs too. You can refer to WP All Import’s documentation to learn more about how to map the additional tabs in the WooCommerce panel

Attributes Tab

Here, you can choose the attributes to create product variations. You can add as many attributes as you want. 

Let’s say our preferred attributes are Color and Size. In the example below, these attributes are set up on the Attributes tab of the WooCommerce Add-On section. 

Map Attributes Tab in WooCommerce Add-On

This will allow us to create product variations based on Color and Size. 

If you want to match with an existing attribute, simply use the attribute slug instead of the name. 

In case your file has different types of variable products with different attributes, configure all the attributes in the plugin. For example, if you have T-shirts with Size and Color attributes and Posters with Canvas Size and Depth attributes- configure all four. If certain attributes don’t exist for a particular product, they will be ignored automatically. You won’t end up with T-Shirts with Canvas Size and Depth or Posters with Size and Color. 

While naming your attributes, you may have to avoid a few terms. For example, you can’t use “Type” as an attribute name. The attribute names that you can’t inside WooCommerce won’t work with WP All Import either. 

Variations Tab

Now we’ll discuss how to set up the Variations tab. 

WP All Import makes the product variation import process very simple and easy. It gives you six options that refer to how product variations are structured in the import file. Moreover, for each option, it shows an example of sample data so that you choose the type suitable for your CSV file. 

Map Variations Tab in WooCommerce Add-On

Link Multiple Variations Together to Form a Variable Product

Variable products are stored as a single-parent product with multiple child variations in WooCommerce. 

For example, a T-shirt might have three color variations- Red, Green, and Blue. 

You can import CSV files that include parent products along with their child variations. Also, you can import variations without parent products. 

The Variations tab helps you specify how you group multiple product variations into a single variable product. Usually, you’ll have one product variation per row for CSV files. 

Let’s take the following example: 

Variation Example A in WP All Import

As you can see, there are two parent products with two variations each. The file contains the parent products as well as the variations. 

In this example, the variations are grouped with the parent products through the SKU and Parent SKU columns. Using the Parent SKU column, WP All Import can assign the variations to the parent product with an SKU that matches with the variations’ Parent SKU. 

Let’s take a look at the following example: 

Variation Example B in WP All Import

In this example, Coca-Cola and Sprite have four variations each. The variations don’t have any parent product, but they are grouped together with the Group ID column. Group ID is the unique identifier in this case. 

Images Section

Images in the parent record will be imported into the product. WP All Import lets you import images from multiple sources—images hosted elsewhere, images currently in Media Library, and images currently uploaded in wp-contents/uploads/wpallimport/files/. 

Map Images Section WP All Import

If you enable the Set the first image to the Featured Image (_thumbnail_id) option, the first image will be assigned as the featured image. The rest of the images will be added to the product gallery. 

Images in the variation record will be imported into the respective variations. Enable the Save variation images to the gallery in the Variations tab to save the variation images to the product gallery. 

Read the following guidelines to know more about importing images for variable products to your WooCommerce store. 

There are some other sections too, such as Custom Fields, Other Product Options, etc. WP All Import allows you to import custom fields to any theme or plugin, including WooCommerce.

Continue to Step 4 once you are done setting up the template. 

4. Apply Additional Import Settings

At this step, you’ll land on the Import Settings screen. 

Here, you can apply some additional settings to optimize your import even further. 

Start by clicking on Auto-detect to generate a unique identifier for your import. You can also build this identifier with import elements. 

Define Import Settings in WP All Import

First, click on Auto-detect to generate a unique identifier for the import. If needed, you can build this identifier by using import elements. This will help you avoid duplicate entries. 

There are two other panels at the bottom– Scheduling Options and Configure Advanced Settings.  

With Scheduling Options, you can automatically schedule your imports. With automatic Scheduling Options, you can schedule your import to take place on certain days of the week. You can also choose monthly imports. You need to purchase our Automatic Scheduling Service to have access to automatic scheduling

Use Automatic Scheduling Service in WP All Import

For manual scheduling, you need to manually create the cron jobs to trigger and run the import. You don’t need to pay anything extra for this! Read our documentation on manually scheduling imports using cron jobs

Configure Advanced Settings allows you to control how WP All Import splits your file into chunks and processes your import.

Configure Advanced Settings WP All Import

Click Continue to move to the final step. 

5. Run Variable Product Import and Verify the Data

You’ll land on the Confirm & Run screen. WP All Import will show you a summary of the import for you to review. 

Confirm and Run Import WP All Import

If everything looks alright, click Confirm & Run Import to complete the import. After the import is complete, WP All Import shows a summary of how many new products it created and if any of the existing products were updated. If your import file has any missing information, it’ll display the number of products skipped during the import.  

Import Complete Message

To review if your variable products were imported correctly, go to Products › All Products in the WordPress menu. 

Review Imported WooCommerce Products

Check the product data tab of a few products at random to confirm that the products were correctly imported. 

There you go! You learned how to import WooCommerce variable products from a CSV file correctly!

To import your variable products to WooCommerce seamlessly, and to enjoy many other useful WooCommerce features, get WP All Import today

Frequently Asked Questions

How to import product attributes in WooCommerce?

You can easily import product attributes in WooCommerce with the WP All Import plugin. It’s the most efficient tool to import bulk product attributes in WooCommerce. 

Follow these simple steps to add products with attributes. 

  • Go to All Import › New Import in the WordPress main menu.
  • Upload/Download your CSV or XML file. 
  • Choose WooCommerce Products as your import post type.
  • Go to the Attributes tab of the WooCommerce Add-On section in the Drag & Drop screen.
  • Use the Add Attribute link to create one attribute for every attribute that you want to import.
  • Provide the names and values for each attribute.
  • Set the options for each attribute.
  • Run your import.

How to add variable product prices in WooCommerce?

Group all product variations with different prices with a unique identifier when making the CSV file. WP All Import will automatically create a parent product for the variable products during your import.

How do I import products with custom fields in WooCommerce?

WP All Import makes importing products with custom fields in WooCommerce very simple. Just follow these steps: 

  • Go to All Import › New Import in the WordPress main menu.
  • Upload/Download your CSV or XML file. 
  • In the Drag & Drop screen, map your import data elements to the fields displayed in the various sections other than the Custom Fields section.
  • Expand the Custom Fields section and click the See Detected Fields button.
  • Map the relevant import data elements to their corresponding custom fields, if applicable.
  • Complete your import.

How to export variable products from WooCommerce?

You can use WP All Export to export variable products from WooCommerce. It’s the best product data export plugin out there. 

Follow these simple steps to export variable products from WooCommerce: 

  • Go to All Export › New Export and select WooCommerce Products from the available list of post types.
  • In the Drag & Drop screen, navigate to Available Data › Product Data › Attributes.
  • Drag & Drop the necessary attributes that refer to product variations.
  • Complete your export and download the file. 
    Experience the Breakdance difference.
    Upgrade your WordPress editing experience with Breakdance, the visual builder for WordPress that's both easy-to-use and exceptionally powerful.
    • Unlimited Sites
    • 60-day Money Back Guarantee
    • Premium Support
    • Only $199.99/Year

    Experience the Breakdance difference.

    Unlimited license.
    Unlimited websites.

    Get maximum flexibility with unlimited licensing and domain activations.

    60-day money back guarantee.
    No questions asked.

    Get your money back within 60 days of purchase, no questions asked. It's risk-free!

    Premium support.
    Get all the help you need.

    We offer premium support to ensure the ultimate customer experience.

    Just $199.99/year for
    unlimited sites.

    For a limited time, we're offering an unlimited site license for just $199.99/year. Buy now to lock in this price.