Guides /eCommerce
eCommerce

WooCommerce Product Variations: How to Set Up Variable Products

July 17, 20257 min readHostBible Team

Variable products let customers choose from different versions of the same item, sizes, colours, materials, formats, from a single product page. WooCommerce handles this well, but the setup process has several interdependent steps that need to be completed in the right order. Miss one and variations either don't generate or don't display correctly. Here's how to configure variable products correctly from scratch.

Simple vs variable products: when to use each

A simple product is a single item with one price, one SKU, and one stock count. It's the right choice for anything without meaningful variants, a single book, a fixed-price service, a specific digital download. A variable product has attributes (Size: S/M/L/XL, Colour: Red/Blue/Green) where each combination of attribute values forms a distinct variation. Each variation can have its own price, SKU, stock level, weight, and image.

If a T-shirt comes in three sizes and four colours, that's a maximum of 12 possible variations, each managed independently. Variable products make sense when variants affect price, stock, or need separate tracking. If all sizes are the same price and you're not tracking stock per variant, a simple product with a product option plugin may be cleaner. WooCommerce's variable product system is powerful but has performance implications at scale, use it when you genuinely need per-variation data, not just for decorative choice fields.

Creating global attributes

Attributes are the dimensions of variation, Size, Colour, Material, Format. In WooCommerce, go to Products → Attributes to create global attributes. Global attributes are available across all products and enable filtering in your shop (customers can filter "Size: M" or "Colour: Blue" from the shop page using the WooCommerce Filter widget). This is the correct approach for attributes that apply across multiple product types.

For each attribute, enter a name (Size), a slug (size), and a type (Select is standard). Save, then click "Configure terms" to add the values (S, M, L, XL). Use consistent naming across your product range, "Small", "Small / S", "S", and "sm" are all different terms in WooCommerce, so a customer filtering "S" won't see products using "Small". Decide on naming conventions before adding any products and apply them consistently.

You can also add custom attributes on individual products without creating a global attribute first. Go to the product edit page → Product Data → Attributes → Custom product attribute. This is useful for one-off attributes that don't apply across the store, but custom attributes can't be used for shop-level filtering, only global attributes can.

Assigning attributes to products

On the product edit page, scroll to Product Data and select "Variable product" from the product type dropdown. Go to the Attributes tab. Click "Add" and select the global attribute you created (Size, Colour, etc.). Check "Used for variations", this is a required step before variations can be generated from these attributes. In the Values field, select the specific terms that apply to this product (a particular product might only come in S, M, and L even though XL exists as a term). Save the attributes before moving to the Variations tab.

Generating and configuring variations

Go to the Variations tab. From the "Add variation" dropdown, select "Create variations from all attributes" and click Go. WooCommerce generates every possible combination of your attribute values. For a product with 3 sizes and 4 colours, this creates 12 variations at once. For a product with 5 attributes each with 5 values, this would generate 3,125 variations, don't generate variations you don't need, as excess variations significantly increase page load time.

Each generated variation needs at minimum a price, WooCommerce won't let the product be published without at least one variation having a price. Expand each variation to add: Regular Price (required), Sale Price (optional), SKU (strongly recommended for inventory and fulfilment), Stock Status or managed Stock Quantity, Weight (for calculated shipping), and an image specific to that variation. Variation images swap out the main product image when a customer selects that variant, a clothing product showing the correct colour swatch image on selection significantly improves the shopping experience.

Use the "Bulk edit" options at the top of the Variations tab to set the same price, status, or stock quantity across all variations simultaneously, then override individual variations that differ. This is far faster than editing each variation individually for large product catalogues.

Stock management per variation

Enable stock management at the variation level to track inventory per SKU. In each variation, check "Manage stock?" and enter the stock quantity. This allows WooCommerce to display "Only 2 left" for a specific size/colour combination, automatically mark out-of-stock combinations as unavailable (greyed out in dropdowns), and prevent overselling a popular variant while slow-moving variants still have stock. Without per-variation stock management, you're tracking stock at the product level, a single pool shared across all variants, which is inaccurate and leads to overselling popular sizes.

Go to WooCommerce → Settings → Products → Inventory to configure global stock behaviour: the "Out of stock threshold" for low-stock notifications, whether to hide out-of-stock products from the shop, and the hold stock duration for pending orders. Set low-stock notifications to an email address that someone actually monitors, many store owners have them going to an unmonitored inbox.

Performance considerations for variable products

Variable products with many variations are database-intensive. WooCommerce loads all variation data on the product page to power the attribute dropdowns, every variation's price range, stock status, and image data is loaded client-side. A product with 50 variations generates a large payload; a product with 200 variations can cause noticeable product page slowness, particularly on shared hosting.

If you have products with 50+ variations, consider a dedicated attribute swatch plugin like Variation Swatches for WooCommerce (free version available). These plugins replace dropdown selects with clickable swatches (colour circles, button labels) and often implement lazy loading of variation data, improving the frontend experience. For products approaching 100+ variations, consider whether the product scope is too broad, splitting one product with 150 variations into three more focused products with 50 each can improve both the customer experience and server performance. WooCommerce sets a default maximum of 50 variations loaded per Ajax request; you can increase this with a filter, but the underlying performance concern remains.

WooCommerce needs a capable server

Variable products with many combinations put real load on PHP and the database. HostBible plans include adequate PHP memory and LiteSpeed performance for WooCommerce stores of all sizes.

View Hosting Plans