How to Customize WooCommerce Product and Category Permalinks

WooCommerce permalinks use a fixed URL structure for products, product categories, and product tags. In many cases, this does not match how you want your store URLs to look or how your store is organized.

If you need more control, you can write or generate a custom code snippet, or use a dedicated permalink plugin. Permalink Manager is a popular option that lets you safely customize store URLs directly from the WordPress admin dashboard.

The plugin does not rely on rewrite rules to match a URL to a content item. Instead, it checks the full URL against the saved custom permalinks. This prevents permalink conflicts and "404" errors caused by custom code that modifies or overrides existing rewrite rules.

When you change a URL, Permalink Manager automatically redirects the old permalink to the new one, so you do not need to install an additional code snippet or use a separate redirect plugin.

How to Change WooCommerce Product and Category URLs

The easiest way to quickly rewrite multiple WooCommerce permalinks is by using the Permastructures editor. Changing the permalink format in that section will automatically set the default for all new WooCommerce permalinks.

Permastructures - WooCommerce section

If needed, you can also adjust the existing permalinks to follow the same structure. To follow best practices, keep the URL structure simple and descriptive. One way to achieve this is by removing unnecessary words from store permalinks.

Although URL length does not affect search ranking, shorter URLs are easier to read, and remember.

If you need to change permalinks individually, you can do so easily directly from the "Edit product (category)" page when updating content or through the bulk "URI editor" in the plugin dashboard.

How to edit WooCommerce permalinks using URI Editor?

Bulk edit permalinks

Adding custom fields to WordPress permalinks usually requires custom PHP or complex workarounds. Permalink Manager Pro removes that problem.

You can add a product SKU to your WooCommerce URLs directly from the admin dashboard without any coding.

You simply choose your preferred permalink structure from the plugin settings, add the SKU variable, and the plugin does the rest.

SKU in permalinks

How to Remove /product/ and /product-category/ from WooCommerce URLs

By default, WordPress keeps permalinks system simple. This is great when you are starting out, but it also means you cannot strip away the standard URL bases using only the settings that come with WooCommerce.

Permalink Manager lets you remove the /product/ and /product-category/ parts from WooCommerce URLs without writing complex custom code snippets.

When a visitor opens a page, the plugin finds an exact URL match and loads the correct content, no matter if it is a product, a category, or a custom post type item without rewrite rules conflict and "404" errors.

Remove product, product-category from WooCommerce URLs

How to Remove "-2" (Duplicate Slug Suffix) from WooCommerce URLs

WordPress automatically appends numbers like "-2" to a URL whenever it detects a duplicate slug. This can happen even if the content is in a different category, parent page, or language.

With Permalink Manager, you can reuse the same slug in WooCommerce permalinks freely without WordPress forcing a numeric suffix.

You can strip the suffix from specific products and/or categories one by one, or set the plugin to use titles instead of original slugs inside custom permalinks.

Example URLs with duplicated slugs

How to Auto-Apply WooCommerce Coupons with a Custom URL

WooCommerce coupons normally require customers to enter a code manually at checkout. Permalink Manager Pro simplifies this process by letting you generate shareable links for WooCommerce coupon codes.

When a visitor clicks the link, the discount applies to their cart automatically.

Coupon URLs

FAQ

If you want to change product or category permalinks, an LLM-generated PHP snippet may seem like the easiest solution. The generated code is based on the problem described in the prompt, so the result depends on how clearly you specified the required changes.

WooCommerce uses custom post types and taxonomies for products, categories, tags, and additional content types added by other plugins. Each of these can use its own permalink structure (rewrite rules). When two or more structures overlap, URL conflicts may occur, resulting in 404 errors or the wrong content being displayed.

If you do not feel comfortable editing PHP files or adding custom code, Permalink Manager offers a simpler and more reliable option. You can change WooCommerce permalinks directly from the WordPress admin dashboard in just a few clicks.

If you run a WooCommerce store, each product, variation, and order can store custom fields as separate rows in the wp_postmeta table. On a store with a large catalog, this table can grow to millions of rows, and every extra record makes future searches a little slower.

Many permalink plugins save their custom permalinks in that same table. Matching a URL to the right product or category then requires multiple SQL queries on an already bloated table. On WooCommerce websites, these queries are a common cause of performance bottlenecks.

Permalink Manager uses a different approach. It does not store custom permalinks in the wp_postmeta table. Instead, all custom permalinks are stored in a single serialized array as one database record. The plugin can then load them with a single database query.

If you would like to learn more about the plugin's data storage, please check out this article.

Last updated by Maciej Bis on: August 28, 2026.


Maciej BisFounder of Permalink Manager & WordPress Developer

The developer behind Permalink Manager, a plugin for managing permalinks, has been working with WordPress, creating custom plugins and themes, for more than a decade.

Go up