How to Change Product Slugs in Bulk in WooCommerce
Shorten or clean up WooCommerce product URLs on many products without breaking old links: what WordPress redirects, what it does not, and how to check.
WooCommerce has no bulk screen for product slugs. You can change one slug at a time in the product editor, or use a plugin or an assistant tool that does many at once. Before you do, know the risk: a new slug means a new address, and every old link to the product must still lead somewhere. For published products, WordPress records the old slug and redirects it to the new one by itself. What it does not cover is the shop-wide product base, which is the second thing to understand.
Should you change a live slug at all?
Often not. Google’s advice on URLs is to use readable words rather than long ID numbers, to separate words with hyphens, and to be consistent about capital letters (Google Search Central: URL structure). If your slugs are already readable words, leave them. Change them when they are clearly broken: full of supplier codes, very long, or copied from a messy import. Every change moves a page that people have bookmarked, shared or linked.
Slug versus product base
A product address has two parts. The slug is the last part, for example blue-mug. The base is what comes before it, for example /product/. They are changed in different places.
The base is a shop-wide setting. Go to Settings > Permalinks, scroll to Product permalinks, choose Default, Shop base, Shop base with category or Custom base, and click Save Changes. If product pages then show 404 errors, click Save Changes again (WooCommerce: permalinks). WooCommerce warns that this changes the address of existing products, and that old links return 404 errors unless you set up redirects. The documentation does not explain how to create them. So do not touch the base on a live shop unless you have a redirect plan.
Changing one slug in the editor
Open the product. After it has been saved once, an Edit button sits next to the address under Product name. A separate Slug panel is hidden by default and you can show it through Screen Options (WooCommerce: product editor settings). Change the slug and click Update.
What about many products?
The bulk edit screen in WooCommerce lists many fields, such as categories, price and stock. A slug is not among them (WooCommerce: bulk editing). The product CSV import schema has no slug column either (product CSV schema), so a spreadsheet round trip with the built-in importer will not do it. Your options are a plugin made for it or a tool that changes slugs for you. One example is Yangtics, whose listing says it bulk edits SEO title, meta description, noindex and slug fields, works with Yoast SEO or Rank Math, and keeps a change log with before and after values (listing). Check how any tool handles redirects before you run it on the whole shop.
Regenerating slugs from titles is a rule you can apply either by hand or with a tool. Decide the rule first: lowercase, words separated by hyphens, no supplier codes. Then try it on three products.
Redirects: what WordPress does for you
When a published product is updated and its slug changes, WordPress stores the old slug. If someone then opens the old address and gets a 404, WordPress looks up the old slug and sends a permanent 301 redirect to the product’s current address. It does this for post types that are not hierarchical, so it covers products but not pages. Several old slugs can be stored on one product (WordPress: wp_check_for_changed_slugs and wp_old_slug_redirect).
What this does not cover:
- Changes to the product base. That changes every address, and WooCommerce says old links return 404 errors.
- Products that were not published when the slug changed. A draft has no public address to protect.
- Tools that write slugs without going through WordPress’s normal update. Test one product first.
Google recommends a permanent server-side redirect, 301 or 308, when a page has moved (Google Search Central: redirects). WordPress’s own redirect is a 301.
Check afterwards
- Change three products first. Open each old address in a private browser window. It should land on the new one.
- Update links that you control: menus, banners, blog posts and emails. A redirect works, but a direct link is better.
- Look at your sitemap and, later, at the indexed pages in Google Search Console, to see that the new addresses are the ones listed.
- Keep a record of old and new slugs, as a spreadsheet or the log of your tool.
The StoreEdit AI way
StoreEdit AI connects Claude or ChatGPT to your shop through MCP, the standard way an AI assistant connects to another system. You ask in plain words: “Shorten the slug of every product in Mugs: remove the supplier code and keep the colour.” The assistant writes a slug for each product, and in WordPress admin you see the slug now, the slug it would become and a tick box on every row. Press Apply selected to write the ones you accept. One request can cover up to 1,000 products. WordPress’s own redirect sends the old link of a published product to the new one, which is the mechanism described above. Undo these changes restores the old slugs, and the History screen keeps the request.
The limits: it changes the address of each product, not the shop-wide base in Settings > Permalinks. Links you typed into pages, menus or emails stay as they are, so update them yourself. See also bulk SEO titles and meta descriptions and undoing a bulk edit.
Questions
Do I need a redirect plugin if I change a slug?
For a published product changed through WordPress, the built-in redirect handles the old address. For a new product base you need your own redirects.
Will a slug change hurt my search results?
Google says it treats the target of a permanent redirect as the address to show. Nobody can promise what happens to rankings, so this post makes no such claim.
Can I use a CSV to change slugs?
Not with the importer’s standard columns. Look for a plugin that adds one.
Can I change the /product/ part?
Yes, in Settings > Permalinks, but it changes every product address and needs redirects.
Do it by asking, and see it first
StoreEdit AI lets Claude or ChatGPT write a cleaner slug for each product, shows the old and the new address for every row, and writes only the ones you apply. The whole request can be undone later.