How to set up swatches across a large WooCommerce catalog without editing every product

How to set up swatches across a large WooCommerce catalog without editing every product - woocommerce swatches for all products

If you set swatch colors one product at a time, your swatches plugin isn’t the problem. The way your attributes were created is.

WooCommerce has two kinds of attributes. A global attribute lives in one place, and every product can share it. A custom attribute lives inside a single product, and no other product can see it.

That difference decides how much work swatches take. Set a color on a global term once, and every product using that term shows it. Use custom attributes, and you set swatches product by product, forever.

Big catalogs often end up with custom attributes nobody chose on purpose. A CSV import, a move from another platform, or years of adding products by hand will get you there.

Below, we take one messy setup and fix it step by step. You’ll check what you have, move to global attributes and set each swatch once. Then you’ll keep the term list clean as the catalog grows.

Before: 400 shirts, 400 separate Color attributes

Say you sell t-shirts. You have 400 of them, and each one has its own Color attribute typed in by hand. One says “Navy | Black | White”. The next says “navy blue | Black”.

Your swatches plugin can still turn those into buttons. But each product’s colors are separate, so you pick the navy shade again on every product. When a new color arrives, you add it 400 times. When you want a color filter on the shop page, there’s no shared list for it to use.

After: one global Color attribute with a short list of terms. You set Navy’s color once. Every shirt shows the same navy. A new product takes a few clicks: pick Color, choose the values, save.

WooCommerce’s own documentation says it plainly: “Generally it’s preferable to define attributes globally.” Custom attributes “will not be available for reuse on other products.”

How to set up swatches across a large WooCommerce catalog without editing every product - custom vs global attributes swatches diagram
Custom attributes make you set swatches on every product. A global attribute lets every product inherit them.

Step 1: Find out which kind of attributes you have

Start with one product. Open it and go to Product data β†’ Attributes.

  • Global attribute: it was added from the “Add existing” dropdown, and its values are picked from a list of terms.
  • Custom attribute: it was added with the “Add new” button, and its values are typed into a box, separated by a pipe ( | ).

Then go to Products β†’ Attributes. If Color isn’t listed there, every Color you see on your products is custom.

One product doesn’t tell you about the whole store, though. For the full picture, export your catalog from Products β†’ All Products β†’ Export. Open the CSV and find the “Attribute 1 global” column (and Attribute 2, 3 and so on). WooCommerce’s import docs use 1 for a global attribute and 0 for a local, product-level one. Sort by that column and you’ll see how many products need moving.

If your products came in from different places, check a few from each source. Products you imported often look different from products you added by hand.

Step 2: Create the global attribute before you touch any product

Go to Products β†’ Attributes and fill in the “Add new attribute” form:

  1. Name: what shoppers will see, like “Color” or “Size”.
  2. Slug: optional. WooCommerce fills it in for you.
  3. Type: “Select” is the WooCommerce default. With WCBoost Variation Swatches installed, you’ll also see Color, Image, Label and Button here.
  4. Enable archives: optional. Leave it off unless you want a page for each color.
  5. Default sort order: choose “Custom ordering” if you want to drag terms into a set order, like light to dark.

Click Add attribute, then Configure terms and add each value: Navy, Black, White, and so on.

A note on core swatches: WooCommerce now has a “Color swatches for attributes” option, but it’s experimental. You turn it on under WooCommerce β†’ Settings β†’ Advanced β†’ Features, and it only works with block themes. We compared it with a plugin in WooCommerce’s built-in color swatches vs a swatches plugin.

Why this order matters: the WooCommerce importer looks for a global attribute with the same name. If it finds one, it uses it. If not, it creates a product-level attribute instead. So create your global attributes before any import or migration, not after.

Step 3: Move your products onto the global attribute

There are two ways to do this. Pick by catalog size.

For a few dozen products: do it by hand

  1. Open the product and go to Product data β†’ Attributes.
  2. Choose Color from the “Add existing” dropdown and select the values this product uses. “Select all” adds every term at once.
  3. Tick Used for variations.
  4. Remove the old custom Color attribute and click Save attributes.
  5. Open the Variations tab and check each variation still has its color set.

That last step matters. Your variations were set up against the old attribute. If a variation shows “Any Color…” instead of a color, pick the right color again and save.

For hundreds of products: use a CSV round trip

The core WooCommerce importer can update existing products. It matches each row to a product by ID or SKU.

  1. Back up your store. WooCommerce’s docs recommend testing large imports on a staging site first. Do that here.
  2. Export your products, including variations.
  3. In the spreadsheet, make each “Attribute 1 name” match your global attribute exactly. “Colour” and “Color” are two different attributes.
  4. Set “Attribute 1 global” to 1.
  5. Clean the values so they match your term names: “navy blue” becomes “Navy”.
  6. Import with Update existing products ticked.

Test with one parent product and a few variations before you run the full file. WooCommerce’s docs suggest exactly that for supplier CSVs, and it applies here too. After the test, open the product and confirm the Attributes tab now shows the global Color, and each variation still has a color.

Some bulk-edit plugins can switch attributes for you as well. If you use one, test it the same way: a backup, a handful of products, then a close look at the variations.

Step 4: Set each swatch once, at the term level

Now the part that saves you hours.

Go to Products β†’ Attributes, edit Color, and change its Type to Color. Then click Configure terms and set the color for each term. Navy gets its navy, once. Every product using Navy now shows it.

Do the same for your other attributes. Here’s a simple way to pick the type:

AttributeSwatch typeWhy
Solid colorsColorShoppers spot a color faster than they read its name
Prints, patterns, fabricsImageA small photo shows what a single color can’t
SizesButton or LabelShort text, easy to tap
Long names (like “Gift box + card”)ButtonKeeps the full name readable

Two details worth knowing:

  • Buttons by default. WCBoost Variation Swatches turns every variation dropdown into buttons by default. Attributes you haven’t touched yet still look like buttons, not dropdowns.
  • Exceptions stay possible. The plugin lets you override the swatch settings on a single product. Use that for the odd case, like one shirt whose “Red” is really closer to burgundy. Don’t use it as your main setup, or you’re back to editing product by product.

You’ll find the style options (shape, size, tooltips) under Appearance β†’ Customize β†’ WooCommerce β†’ Variation Swatches. Our plugin docs walk through each one.

I’d do this cleanup even if your swatches already look fine today. Custom attributes are a slow tax: every new color, every rename, every filter you add later costs one edit per product. Do the boring part once on staging, and every product you add after that costs you nothing extra.

Step 5: Stop “Navy”, “navy blue” and “Dark Blue” from multiplying

A global attribute only stays useful if the term list stays clean. These rules keep it that way:

  1. One name per color. Pick the name a shopper would say. If you have “Navy”, “navy blue” and “Dark Blue”, choose one and move the products from the other two onto it.
  2. One way of writing it. Decide on capitals (“Navy”, not “navy”) and stick to it.
  3. Keep supplier codes out of term names. “Navy” is a term. “NVY-204” belongs in the SKU or the term’s description field.
  4. Match your CSVs to your terms. The importer matches by name, so a supplier file that says “Navy Blue” won’t land on your “Navy” term. Fix the file before you import.
  5. Watch the “Create value” button. When you edit a product, WooCommerce lets you create a new value on the spot, and it’s saved for every product to use. That’s handy, and it’s also how duplicates creep in. If more than one person adds products, agree on who adds new terms.
  6. Sort terms on purpose. With “Custom ordering” turned on, drag the terms into an order that makes sense. Sizes from small to large. Colors from light to dark, or best-seller first.

Once a month, open Configure terms for each attribute and look for near-duplicates. Catching one early takes a minute. Catching it after it has spread across your catalog takes far longer.

Step 6: Check it like a shopper, on a phone

Switching attributes changes data behind every product, so check the front end before you call it done. Use your phone, not just your desktop.

  • Category pages. Each product should still appear once, not once per color. Baymard Institute’s research found major usability issues when stores list variations as separate items. In their 2021 benchmark, 12% of sites still did it.
  • Three product pages. Pick one you moved by hand, one you moved by CSV, and one brand-new product. Tap every swatch. The photo, price and stock message should all update.
  • Add to cart. Add a variation from each of the three products and check the cart shows the right color.
  • Shop filters. If you use filter blocks, check the Color filter now lists your terms.

If a product still shows a dropdown, or a swatch looks wrong:

  • Clear your cache. Page caching often serves the old version for a while.
  • Check the Attributes tab. If Color is still custom on that product, it missed the move.
  • Test with a default theme. Switch to Storefront on staging. If swatches work there, your theme is overriding the product page.

Your before and after, in one table

Before (custom attributes)After (global attributes)
Set a swatch colorOn every productOnce per term
Add a new colorEdit every productAdd one term
Rename a colorEdit every productRename the term once
Shop color filterNo shared list to filter byWorks from the term list
ImportsCreate new custom attributesLand on your global terms when names match

Start with Step 1 today: export your catalog and count the zeros in the “Attribute global” columns. That number tells you how big the job is.

When you’re ready to set the swatches themselves, WCBoost – Variation Swatches is free on WordPress.org.