# How to Add a Variable Product in WooCommerce

> **Source video:** https://www.youtube.com/watch?v=lWQkNR38_EM

A variable product is a product with multiple variants — for example, a top available in different colors (light pink and yellow) and different sizes (small, medium, and large). This guide walks through creating a variable product, adding attributes, generating variations, setting prices and images, and publishing it.

## Start the Product and Switch to Variable Product

1. From the WordPress dashboard, go to **Products** and click **Add new**.
2. Enter the **Product name** and paste in the product **Description**.
3. Scroll down to **Product data** and switch **Product type** from **Simple product** to **Variable product**.
4. A notice appears telling you that you can now add attributes (the different variants like size or color) to the product.
5. Note that the price field from the simple product has disappeared — this is because you can set the price for each variation individually.

## Add Attributes

1. Click the **Attributes** tab and add your first attribute.
2. For **Color**, enter the values for the different colors, e.g. `light pink` and `yellow`.
3. Separate each value with a vertical line (`|`). On the keyboard used in the video this is **Option 7**; on your keyboard the key may differ, and the vertical line character is also available in the video description to copy and paste.
4. Click **Save attributes**.
5. Click **Add new** to add a second attribute for **Size**, then enter `small`, `medium`, and `large` and click **Save attributes**.

## Generate the Variations

1. Click the **Variations** tab.
2. Click **Generate variations** and confirm. All six variants are generated: small, medium, and large for the light pink color, and small, medium, and large for the yellow color.

## Set Prices and Variation Images

- You can add prices to each variation separately by clicking **Edit** on an individual variant and entering a price there.
- If all variants share the same price, click **Set regular prices** (the "add price" option) at the top to apply a price to all variants at once.
- Product images must be added separately for each variant:
  1. Click **Edit** on the first variant.
  2. Click the image icon and upload the images for both colors.
  3. Choose the light pink image and click **Set variation image**.
  4. Repeat for the next light pink variant, and then for each yellow variant using the yellow top image.

## Finish the Product Setup

1. Scroll to the bottom and add the **Short description**.
2. Scroll back up to **Product image** and set the **Default product image** by choosing an image and clicking **Set product image**.
3. Scroll back down to **Product data** → **Variations** and set the **Default form values** — this determines which variation is displayed by default when customers open the product (in the video: light pink and small).
4. Add more images to the product **Gallery**:
   - Click **Add product gallery images**, choose an image, then **Shift-click** a second image to select both at once, and click **Add to gallery**.
5. Create a category for the product by clicking **Add new category**, entering the category (e.g. tops), and clicking **Add new category**. Tags are optional and can be skipped.
6. Scroll up and click **Publish** or **Update**.

## View the Product Page

1. Right-click **View product** and open it in a new tab.
2. The product page shows the default variation (light pink and small). Change the color to yellow and the image updates accordingly; you can also switch between sizes.
3. At the bottom of the page you'll see the gallery images that were added.