How to Export and Import Variable Products in WooCommerce
Variable products are the trickiest WooCommerce data to move correctly, because a single product can expand into a dozen linked rows once you factor in size, color, or any other variation. In this guide, I break down how WooCommerce structures that data, then walk through exporting and importing it using both WP All Import’s Automatic […]
Variable products are the trickiest WooCommerce data to move correctly, because a single product can expand into a dozen linked rows once you factor in size, color, or any other variation.
In this guide, I break down how WooCommerce structures that data, then walk through exporting and importing it using both WP All Import’s Automatic Setup and its manual field-mapping process.
To follow the examples, you can use this free online sandbox. Just choose the WooCommerce Store option and click Create Sandbox.
Table of Contents
- What is a WooCommerce Variable Product and How is it Defined?
- How to Export a WooCommerce Variable Product
- How to Import a WooCommerce Variable Product
- WooCommerce Import Variable Product Walkthrough
- Export and Import Variable Products in WooCommerce Wrap-Up
- FAQs
What is a WooCommerce Variable Product and How is it Defined?
A WooCommerce variable product is a product that has multiple versions. For example, a t-shirt may have different sizes and colors. Each unique combination of size and color is considered a variant.
WooCommerce stores each variable product as a parent record plus one linked record per variation, and understanding that structure is what makes exporting and importing this data possible.
In WooCommerce, this begins with attributes and terms. Attributes let you define additional characteristics of a product, such as color. Terms are the options that make up an attribute, such as green, blue, red, etc.
To create a new attribute, go to Products > Attributes in the WordPress main menu:
- Enter the name of the new attribute. For this example, use the name “Flammability”.
- Enter the slug (this is optional since WooCommerce will generate its own slug if you leave this field blank).
- Click the Add attribute button.
This will update the screen as follows:
Click the Configure terms link opposite your new Flammability attribute, as shown above. This will bring you to this screen:
- Enter “Class A” as the name of your first term.
- Click Add new Flammability.
Repeat this process for terms “Class B” and “Class C” until your screen looks like this:
Navigate back to Products > Attributes, where your Flammability attribute should now appear as follows:
At this point, the Flammability attribute is not connected to any products. It is a global product attribute, which is essentially just a named list, as you can see from the screen above.
Before we continue, create the simplest possible test product in WooCommerce. In our test system, we have called this “Test Product 1”. If you don’t know how to create a product in WooCommerce, see How to Add Products in WooCommerce.
You can assign attributes to a product in the Attributes tab of the WooCommerce Add-On section when adding or editing the product:
When you do this, you are not creating a WooCommerce product variant. Attributes can be used independently of variants. For example, we could use the Flammability attribute simply to describe Test Product 1’s degree of flammability, with no intention of creating multiple versions of that product.
In fact, when a product is defined as a Simple product, as is the case in the preceding image, you’re not allowed to create variants. To change this, you must first change the product type to Variable product. When you do this, a new Used for variations option appears in the Attributes tab,
Check this option, click the Save attributes button, and then update the product.
At this point, you still haven’t created any WooCommerce variable products. You’ve just created the conditions required to generate variants.
To complete the task, switch to the Variations tab:
Here, you have two options. You can choose to Create variations from all attributes, or you can be more selective and add variations one at a time. In this case, select Create variations from all attributes and click the Go button.
When you do this, you will receive a warning that says, “Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max 50 per run).”
The reason for this warning is simple. Create variations from all attributes means generating all possible combinations of attributes attached to a product. So, if you have a Size attribute with three terms (Small, Medium, Large), and a Color attribute with four terms (Blue, Green, Red, Yellow), this option will generate 3 x 4 = 12 variants, i.e., Small Blue, Medium Blue, Large Blue, Small Green, etc.
In this case, we have only one attribute (Flammability) with three terms, so go ahead and generate variants for all of them:
When you’re finished, click the blue Save Changes button at the bottom of the Variations tab, then update the product.
Now you’re ready to export this data.
How to Export a WooCommerce Variable Product
Navigate to All Export > New Export in the WordPress main menu:
- Select WooCommerce Products as the export post type.
- Expand the Add Filtering Options section. We’re going to create a filter here so that we export only our test product.
- Choose Title as the filter Element.
- Select contains as the filter Rule.
- Enter “Test Product” as the value (or the main part of whatever you have named your variable product).
- Click the Add Rule button.
As soon as you click the Add Rule button, WP All Export will apply the filter:
As you can see, the product count has been reduced from 110 products to 4. Why 4? You will see shortly.
Click the Customize Export File to proceed to the Drag & Drop screen:
This screen is normally used to select which data fields to include in the export. To learn how this is done, see How to Export and Import WooCommerce Products.
However, as you can see, the second row of fields in the export column selection area (left upper half) already contains the attribute/variation fields. Instead:
- Expand the Advanced Options section.
- Take note of the Product Variations options, which, among other things, allow you to export just the parent products, just the variations, or both.
Click the blue Continue button at the bottom (not shown). This will bring you to the Export Settings screen:
Let’s skip over this screen, too, by clicking the Save & Run Export button. This will initiate the export. When it’s complete, you will see this Confirm & Run screen:
Click the CSV button to download a CSV version of the export file. Open this file in your favorite spreadsheet software. I’ve done this in Excel. I also narrowed some columns so that I can focus on the ones relevant to variable products:
First, note that there are four product records: one for the parent test product and one for each of the three Flammability variants.
Here is a description of the relevant columns:
- SKU. In this setup, only the parent product has an SKU, but you can set it up so that variants get their own SKU, too.
- Parent Product ID. This is a key link between parent products and their variants. One of the ways we can tell that variants are variants is because they reference the ID of the parent product.
- Product Color and Product Shape. These are both global product attributes, which is why they are included in the default export column configuration. But they are not attached to our test product, so they are blank.
- Product Flammability. This attribute is attached to our test product. The parent product contains the set of all attribute terms in this column, each separated by a pipe (“|”) character. The product variants each have one term that defines them as a variant.
- Product Attributes. This is a serialized form of the attribute data, which is not very readable for the average user.
WP All Export outputs one row per parent product and one row per variation, with the Parent Product ID column linking each variation back to its parent. This structure is what makes the export file readable and reusable for a later import.
How to Import a WooCommerce Variable Product
Importing WooCommerce variable products can be a lot more difficult than exporting them, especially when the import data is coming from a third party that may not understand (or care) how WooCommerce structures its data.
To create an import, you would normally go to All Import > New Import. However, we’re going to take a shortcut and instead go to All Export > Manage Exports.
Here, click Import with WP All Import for the export that you just completed.
Why is this a shortcut? Because one of the cool features about WP All Export is that it not only remembers all of your exports. It can also access the field mappings and other settings applied to each export, which allows it to automatically configure an import when dealing with a file that has the exact same structure as the export file.
This removes the need to manually remap fields for tasks like bulk edits, where you export data, edit it in a spreadsheet, and then import the changed data back into WooCommerce. But it’s also an excellent way to learn how to import data for WooCommerce variable products, which is how we’re going to use it here.
After you click Import with WP All Import, you will be brought to the New Import screen:
- Upload the exact same file that you just exported.
- Click Continue to Step 2.
This brings you directly to the Drag & Drop screen. All the incoming data elements are already mapped to their target WooCommerce fields in this scenario — you don’t have to take any actions — but we’re going to draw red mapping lines just to illustrate how to map these elements manually, starting with the Title & Description section:
Collapse the Title & Description section and instead expand the WooCommerce Add-On section. Here, click on the Attributes tab:
As you can see, you can drag the incoming data elements that contain attribute data to the fields shown above. In other words, you can create the attributes as part of the import process.
Expand the Advanced option on the right of the flammability attribute:
Notice how you can set all of the options during the import that you can set when creating the attributes manually through the interface. In fact, you can go a step further by auto-creating the terms!
Finally, note the Link all variations option. This allows you to autogenerate all possible variations given the incoming attribute data.
Switch to the Variations tab:
Here, notice that we’re not mapping incoming data to individual variants. Instead, we’re mapping the relationship between parent products and their variations. Once WP All Import knows that, it can figure out the rest.
However, this is not the only way to map this relationship. If you look at the area inside the red rectangle, you will see these other options:
- All products with variations are grouped with a unique value that is the same for each variation and unique for each product.
- All variations for a particular product have the same title as the parent product.
- All variations for a particular product have the same title. There are no parent products.
- I’m importing XML and my variations are child XML elements.
- I’m importing new variations to existing products.
WP All Import supports six distinct methods for linking variations to their parent product during import, covering the different ways parent-variation relationships can appear in a source file.
If you click on these options, you will see that they each have their own unique settings. Some of them even have sample data to help you confirm that you’re using the right approach.
For example, if you select All variations for a particular product have the same title as the parent product, you will see the following options and sample data:
Exporting data, reimporting the same file to inspect the default mappings, reviewing sample data, and testing different import options together give you every reference point needed to configure a variable product import in WooCommerce.
To show you exactly how this works, I’ll walk through a complete import from A to Z, using both Automatic Setup and manual field mapping.
WooCommerce Import Variable Product Walkthrough
Start by doing the following:
- Delete Test Product 1 (or whatever you named it) from your test system.
- Delete the Flammability attribute.
This gives a clean starting point to test both import methods against the exact same file, starting with Automatic Setup.
Method 1: Importing WooCommerce Variable Products via Automatic Setup
1. Select Your Import File
Navigate to All Import > New Import and click Set up automatically to open Automatic Setup and upload the file you exported earlier. You can upload it directly, download it from a URL, choose an existing file already on the site, or pull it from FTP/SFTP.

2. Choose What to Import
Select WooCommerce, then Products as the specific type of WooCommerce data you’re importing.

An optional Add Setup Instructions field lets you clarify ambiguous fields before Automatic Setup builds the mapping, for example, specifying which column maps to product SKU, or flagging that a column like parentsku links variations to their parent product. Click Start Automatic Setup to continue.
3. Review the Field Mappings
Automatic Setup analyzes the file and returns a mapping summary.

Scroll through the Field Mappings list to confirm the parent-variation relationship was captured correctly. For a variable product import, check specifically that Product Type is mapped to variable and that Parent Product ID is mapped to the column linking each variation back to its parent; in this example, the SKU-based Flammability attribute data from the earlier export.

From here, click Review Import Configuration to inspect or adjust the template before running, or click Run Import to start immediately.
4. Run the Import and Verify the Data
Click Run Import to start.

When the import finishes, a summary shows how many records were created, updated, and skipped.

To confirm the variable product imported correctly, go to Products > All Products, open Test Product 1, and check the Attributes and Variations tabs for the same data you originally created by hand.
Method 2: Importing WooCommerce Variable Products Manually
1. Create New Product Import
Go to All Import > New Import:
- Upload the file that you previously exported.
- Choose New Items.
- Select WooCommerce Products.
- Click Continue to Step 2.
This brings you to the Review Import File screen.
2. Review the Import File
Here, you can review the content of your import file as interpreted by WP All Import. Since this content looks as expected, click the Continue to Step 3 button, which brings you to the Drag & Drop screen.
3. Map Incoming Data Elements to the WooCommerce Product Fields
This time, drag the incoming title and content data elements to the target fields shown above, then collapse the Title & Description section and expand the WooCommerce Add-On section:
Here, set the Product Type to Variable product. Note, if you’re importing data with different types of products, you can also set this with an incoming data element (producttype in this example) using the Set Product Type With XPath option.
Also, drag the sku incoming data element to the SKU field.
Next, switch to the Attributes tab:
- Enter “Product Flammability” as the name of the attribute that we’re going to import.
- Drag the productflammability data element to the Values field.
- Expand the Advanced section.
- Select the Link all variations option.
At the bottom of this screen, click the Continue to Step 4 button (not shown). This will bring you to the Import Settings screen.
4. Configure the Import Settings
First, click the Auto Detect button at the top. This will cause WP All Import to identify the field or fields that make up a Unique Identifier for the data you are importing, in this case, one that accounts for the presence of variants.
Click the Continue button at the bottom. This will bring you to the Confirm & Run screen.
5. Confirm and Run the Product Import
Click the Confirm & Run Import button. After the import completes, you will see this confirmation screen:
6. Check the Imported Data
At this point, if you navigate to Products > All Products, edit your test product, and examine the Attributes and Variations tabs, you should see the same data that you previously created manually, this time created entirely by the import process:
Export and Import Variable Products in WooCommerce Wrap-Up
In this article, I showed you how to export and import WooCommerce variable products two ways: with Automatic Setup and with manual field mapping. Which one you reach for depends on how much control you need over the mapping versus how quickly you want the import done.
I also showed you how to use WP All Export/Import’s online sandbox to test either method against your own file, so you can work out how to handle any variable product import scenario before running it on a live site. This matters because variable product import data can come in so many different configurations.
If you run into an import that is especially complicated, and you’re a paid customer of WP All Export/Import, you can also contact their support team via email. They have more than a decade of experience handling every form of export and import imaginable, so they should be able to help you out.
Export and Import Variable Products in WooCommerce – Frequently Asked Questions
Can I import WooCommerce variable products from an Excel file?
Yes. WP All Import reads XLS and XLSX files directly, without requiring you to convert them to CSV first, and it also supports Google Sheets via the Download a File option. This applies to both Automatic Setup and manual field mapping; either method works the same way once the file is uploaded.
Does WP All Import automatically map fields for a variable product import?
Yes. WP All Import’s Automatic Setup uploads your file, detects the product type, and maps variations to their parent product without manual field configuration. You can also add Setup Instructions to clarify ambiguous fields, such as which column maps to product SKU, before the mapping is generated.
How do I link product variations to their parent product during import?
WP All Import links variations to their parent product using the Variations tab in manual field mapping, where you can choose from several methods depending on how your file is structured, including matching by a shared parent SKU, matching by title, or importing variations as child XML elements. Automatic Setup handles this same relationship automatically by detecting the column that links each variation row to its parent.
What’s the best way to import variable products into WooCommerce?
The best way to import variable products into WooCommerce is with WP All Import. WP All Import handles variable product imports two ways: Automatic Setup maps the parent-variation relationship automatically, and manual field mapping lets you configure every field yourself. Which one to use depends on how much control you need over the mapping versus how quickly you want the import done.
Related Information
Want more information on how to export and import WooCommerce variable products? See these key articles:
- WooCommerce Product Export – Plugin Description
- WooCommerce Product Import – Plugin Description
- Official Documentation: How to Export WooCommerce Products
- Official Documentation: How to Import WooCommerce Products
- Official Documentation: How to Export WooCommerce Variable Products
- Official Documentation: How To Import Variable Products in WooCommerce
- Official Documentation: How To Export WooCommerce Products with Images
- Official Documentation: How To Import WooCommerce Products with Images
- Official Documentation: How to Bulk Edit WooCommerce Products
- Official Documentation: How to Migrate WooCommerce Products to a Different Website
- Cheat Sheet: How to Import Product Attributes in WooCommerce
- Cheat Sheet: How to Get a List of Product Attributes from WooCommerce
- How to Import and Export WooCommerce Customers
- How to Import and Export WooCommerce Orders
- Best WooCommerce Bulk Edit Plugins
- How to Import and Export WordPress Users
- How to Export and Import WordPress Categories and Tags
- How to Import and Export Advanced Custom Fields
- How to Export and Import Gravity Forms Entries
Related Videos
Get Oxygen
Build it your way with Oxygen.
Not per year, not per site, not per seat. 60 day money back guarantee.





























