Skip to content
HyperDAF editorialWooCommerce

How to Add a Variable Product in WooCommerce: Sizes, Colours, and Prices That Work

A simple product has one price: one shirt, one price. A variable product has options: the same shirt in three sizes and four colours, each with its own price and…

How to Add a Variable Product in WooCommerce: Sizes, Colours, and Prices That Work
WooCommerceEditor-curated guide
9 min10 sectionsIntermediate
Table of contents10

A simple product has one price: one shirt, one price. A variable product has options: the same shirt in three sizes and four colours, each with its own price and stock. If you sell clothing, shoes, food packs, or anything that comes in more than one version, you need variable products — and if you set them up wrong, customers hit dead ends where a size has no price, or a colour cannot be selected.

This guide walks you through creating a variable product step by step: attributes, variations, prices, stock, and images. No extra purchase is needed — variable products are built into WooCommerce.

Simple vs Variable: Which One Do You Need?

Before you start, decide which product type fits. The choice is simple:

  • Simple product. One version, one price, one stock count. A single book, a single download, a single pack. If the customer has no choice to make, use a simple product.
  • Variable product. One product with options the customer chooses — size, colour, material, or pack size. Each combination is a variation with its own price, stock, and image.

A common mistake is creating a separate simple product for every size. That gives you twelve listings for one shirt, twelve pages to maintain, and a shop that looks like a warehouse. One variable product with twelve variations is cleaner for you and clearer for the customer.

Use a variable product when the options belong to the same product — the same shirt in different sizes, the same phone case in different colours. Use separate products when the items are genuinely different — a shirt and a pair of trousers are not variations of each other.

Step 1: Create the Attributes

An attribute is an option type: Size, Colour, Material. Before you create the product, set up the attributes you will reuse across products.

From the dashboard, go to Products, then Attributes. Add an attribute — for example, “Size” — and add its terms: Small, Medium, Large. Add another attribute, “Colour”, with its terms: Black, White, Blue.

Give each attribute a clear name and keep the list short. Three sizes and four colours give twelve variations, which is manageable. Five attributes with five terms each gives 3,125 variations, which is not. If your product genuinely needs that many options, split it into separate products instead.

Attributes you create here can be reused on every product, so set them up once and use them everywhere. That also keeps your shop consistent: “Medium” means the same thing on every product page.

Step 2: Create the Product and Choose “Variable Product”

Go to Products, then Add New. Write the product title and description as you would for any product: what it is, who it is for, and what makes it worth buying.

In the Product Data box, change the dropdown from “Simple product” to “Variable product”. The screen changes: the price field disappears from the top level, because the price now lives on each variation.

Fill in the general fields first:

  • Product image and gallery. Add a clear main image and a few gallery images. You can add a different image for each variation later.
  • Short description. One or two lines that show on category pages. Say what the product is and what options it has.
  • Categories and tags. Put the product in the right category so customers can find it.
  • Inventory. Set the stock status at product level only if you are not managing stock per variation. Most stores manage stock per variation — a Medium in black can be out of stock while a Large in white is available.

Step 3: Add the Attributes to the Product

Open the Attributes tab in the Product Data box. Add the attributes you created — Size, then Colour — and tick “Used for variations” for each one. This tick is the step people forget: without it, the attribute shows on the page but the customer cannot select it to change the price.

Choose “Select all” for the terms, or pick only the terms this product actually comes in. If this shirt does not come in Small, do not include Small — a variation with no stock is a dead end, and a term with no variations is worse, because the customer can select it and then nothing happens.

Save the attributes before moving on. If you skip the save, the next tab will not show the options you just added.

Step 4: Create the Variations

Open the Variations tab. Choose “Create variations from all attributes” and confirm. WooCommerce generates every combination: Small Black, Small White, Small Blue, Medium Black, and so on.

Now open each variation, one by one, and fill in:

  • Price. Every variation needs its own price. A variation with no price cannot be bought. If all variations cost the same, set the same price on each one — do not leave the field empty and hope the product-level price applies, because a variable product has no product-level price.
  • Sale price. If a variation is on sale, set its sale price here, with the regular price above it. The sale price must be lower than the regular price, or the store will ignore it.
  • Stock. Set the quantity for each variation and tick “Manage stock” if you want WooCommerce to stop selling a variation when it runs out. This is how you avoid selling a size you do not have.
  • Image. Add a photo of this exact variation. When the customer selects “Blue”, the main product image should change to the blue version. This single detail raises sales more than almost any other, because the customer can see what they are buying.
  • SKU. Give each variation its own code if you track stock by code. If you do not use codes, leave it blank.

There is a bulk action menu that sets the same price or stock status on all variations at once. Use it to set the baseline, then fix the exceptions by hand. Bulk actions save time; hand-checking catches the one variation you forgot.

Step 5: Check the Product on the Shop Front

Before you publish, preview the product page as a customer sees it.

Select each option in turn. The price should update, the image should change, and the “Add to cart” button should work for every combination. Try a combination that should be out of stock — the button should say so clearly, not let the customer add something you do not have.

Check the page on a phone too. The option dropdowns should be easy to tap, and the price should be visible without scrolling. Most of your buyers will choose their size on a phone, so if the options are cramped or hidden there, fix that first.

Only when every combination works should you publish. A variable product with one broken variation is worse than no product at all, because the customer who hits the broken one will not try another — they will leave.

Common Mistakes and How to Fix Them

  • A variation has no price. The customer selects it and the price disappears or the button does nothing. Open the variation and set a price.
  • The attribute is not ticked “Used for variations”. The option shows on the page but does not change anything. Tick the box, save, and regenerate the variations.
  • The same attribute name spelled two ways. “Color” on one product and “Colour” on another creates two separate attributes. Pick one spelling and use it everywhere.
  • Too many variations. Hundreds of variations make the product page slow and the stock impossible to manage. Split the product, or reduce the options.
  • No image per variation. The customer selects a colour and the photo stays the same. Add an image to each variation that looks different.
  • Stock managed at product level, not variation level. The product shows “in stock” while the size the customer wants is gone. Manage stock per variation.
  • A variation with no stock is still selectable. Set its stock to zero and its status to “out of stock”, so the customer sees that immediately instead of at checkout.

Variable Products and Your Store’s Daily Work

Variable products need a little more care than simple ones, and the care pays off in fewer support messages.

When a new delivery arrives, update stock per variation, not per product. When a variation sells out, mark it out of stock the same day — a customer who orders a size you do not have is a refund and an apology. When you run a sale, set the sale price on the variations you actually want to discount, not on all of them, so the discount means something.

Once a month, check your variable products for variations that never sell. A variation that has sat at zero sales for months is a candidate for removal — it clutters the page and the customer has to scroll past it. Removing dead variations makes the product page faster to read and easier to buy from.

FAQs

What is the difference between a simple and a variable product?
A simple product has one version and one price. A variable product has options — size, colour, or material — and each combination has its own price, stock, and image. Use a variable product when the customer must choose between versions of the same item.

How many variations can one product have?
There is no hard limit, but keep it practical. Twelve to thirty variations work well. Hundreds of variations slow the page down and make stock management painful. If you need more, split the product into two or three related products.

Why does my variable product show no price?
Because no variation has a price, or because the customer has not selected all the options yet. A variable product has no price of its own — the price appears once the customer picks a combination. Set a price on every variation and the problem goes away.

Can each variation have its own image?
Yes. Open the variation and add an image. When the customer selects that variation, the main product image changes to match. This is one of the most useful features of variable products — use it on every product where the options look different.

Related Guides

Hayat Khan

Written by

Hayat Khan

Hayat Khan is the founder and owner of HyperDAF. He designs and develops HyperDAF's own WordPress themes, plugins and tools — every product on the platform is built, published and supported by his team, never resold from anyone else. He writes about WordPress, WooCommerce and building professional websites that are easy to run and maintain.

36 published articles
View all articles

Related articles

View all articles

Join the discussion

Your email address will not be published. Required fields are marked *

Keep comments relevant and respectful.