Add SKU to WooCommerce permalinks

In this short article, you can find instructions on how to easily include SKU number in WooCommerce product permalinks.

Some of the functionalities presented in this article are not available in free version (Permalink Manager Lite). Buy Permalink Manager Pro

Permalink Manager works perfectly well with WooCommerce post types & taxonomies. For instance, you can use it to remove the permalink bases from products, product categories or tags. In addition, one of the most useful functions is possibility to add SKU numbers to product permalinks.

Firstly, you need to go “Tools -> Permalink Manager -> Permastructures” admin page and scroll down to WooCommerce section.

Add SKU to the product permastructure settings

Now, you need to add “%__sku%” tag inside the permastructure settings for Product post type.

You can insert SKU anyway you like inside the input field. If you would like to use it instead of product slug you will also need to stop Permalink Manager from appending the slug to the end of URL.

To do so, please click on “Show additional settings” to display the additional panel. Then you should enable “Do not automatically append the slug” mode. Afterwards, Permalink Manager will no longer automatically append the product slug to the end of URL.

After you save the new permastructure settings, Permalink Manager will automatically add the SKU number to the product permalinks.

Nevertheless, the old product permalinks need to be regenerated. To apply the new permalink format please go to “Tools -> Regenerate/reset“ section.

Regenerate/reset subsection.

To reset the Product’s permalinks please set:

  • Mode” to: “Regenerate custom permalinks
  • Select content type” to: “Post types
  • Select post types” to: “Products
  • Select post statuses” to “Published
Regenerate WooCommerce permalinks (products)
Form settings for “Products”

After “Regenerate” button is clicked, a list of updated products’ permalinks should be displayed.

A list of old products after their permalinks are regenerated.
Go up