Chykalophia Docs
WooCommerce

How to add a variable product (sizes, colors)

Step-by-step guide to creating a WooCommerce variable product with attributes like size and color, and setting prices and stock for each variation.

woocommercee-commerceproductswordpressintermediate

A variable product lets customers choose between options — like size, color, or material — before adding an item to their cart. This guide walks you through setting one up from scratch.

Quick summary

A variable product has attributes (like "Size") and variations (like Small, Medium, Large). You create the attributes first, then generate the variations and set a price for each one. Plan your options before you start — it makes the process much smoother.

What you'll need

Intermediate 15–20 minutes
  • WordPress admin access (Administrator or Shop Manager role)
  • A list of the options you offer (e.g., sizes: S, M, L, XL — colors: Red, Blue, Green)
  • A price for each combination (you can use one price for all if they are the same)

Understanding the terminology

Before you start, two terms to know:

  • Attribute — the type of option (e.g., "Size" or "Color")
  • Variation — one specific combination of attributes (e.g., Size: Medium, Color: Blue)

Step-by-step: creating a variable product

Go to Products → Add New. Fill in the product name, long description, short description, image, categories, and tags just as you would for a simple product. See How to add a simple product for those steps.

Change the product type to Variable product. In the Product data panel, open the dropdown at the top and select Variable product. The panel tabs will change to include an Attributes tab and a Variations tab.

Go to the Attributes tab. Click the Attributes tab inside the Product data panel. You will see an "Add" button and a dropdown to select an attribute.

Add your first attribute. Click Add next to the attribute dropdown. A new form appears. Type in the attribute name (e.g., "Size"). In the Value(s) field, enter each option separated by a vertical bar character (|) — for example: Small | Medium | Large | X-Large.

Make sure the Used for variations checkbox is ticked. Click Save attributes.

Add any additional attributes. If your product has more than one option dimension (e.g., both Size and Color), click Add again and repeat for the next attribute.

Go to the Variations tab. Click the Variations tab. You will see a dropdown that says "Add variation." Open it and choose Create variations from all attributes, then click Go. WooCommerce will generate every combination automatically.

Set prices for each variation. Each variation now appears as a row you can expand by clicking it. At minimum, you need to fill in the Regular price for each. You can also set a sale price, manage individual stock levels, and upload variation-specific images.

Save your changes. Click Save changes at the bottom of the Variations tab to save all variation data.

Publish the product. Click Publish (or Update if you are editing an existing product). Customers can now choose their options on the product page.

Don't forget to set prices

WooCommerce will not allow customers to add an unprice variation to their cart. If you generate many variations, make sure every single one has a price set before publishing.

Setting a single price for all variations

If all your variations cost the same price, you do not need to set each one individually. Click the Variations tab, open the Select all dropdown at the top, choose Set regular prices, and enter the price. WooCommerce will apply it to every variation at once.

Adding variation-specific images

Each variation can have its own image, which swaps out automatically when the customer picks that option. Inside each variation row, click the placeholder image on the left to upload or select a photo.

Managing stock per variation

You can track stock separately for each variation. Inside each variation row, check Manage stock? and enter the current stock quantity. When a variation runs out, WooCommerce marks it as unavailable.

See Managing stock & inventory for more.

Common questions

Need a hand?

If you're stuck, email support@chykalophia.com and we'll help. Include your website address and a screenshot if you can.

Learn more

How to add a variable product (sizes, colors) | Chykalophia Docs