Permalink Manager allows to easily remove the permalinks slugs added to WooCommerce permalinks. Below you can find instructions on how to bulk edit product, categories and tags permalinks. Of course you can adjust each of them manually.
Some of the functionalities presented in this post are available only in Permalink Manager Pro.
This tutorial shows how to easily remove the permalink bases from WooCommerce URLs. Similarly you can use it also as a reference for the other custom post types & taxonomies.
Sample WooCommerce permalinks format
As you probably know, WooCommerce permalinks by default contain rewrite bases. They are marked in red.
# Product categories: http://my-woocommerce-shop.com/product-category/polos/ http://my-woocommerce-shop.com/product-category/t-shirts/ # Product tags: http://my-woocommerce-shop.com/product-tag/cotton/ http://my-woocommerce-shop.com/product-tag/wool/ # Products: http://my-woocommerce-shop.com/product/plain-casual-t-shirt/ http://my-woocommerce-shop.com/product/elegant-cotton-polo/
With Permalink Manager we can get rid of rewrite bases and simply shorten them to e.g.:
# Product categories: http://my-woocommerce-shop.com/polos/ http://my-woocommerce-shop.com/t-shirts/ # Product tags: http://my-woocommerce-shop.com/cotton/ http://my-woocommerce-shop.com/wool/ # Products: http://my-woocommerce-shop.com/plain-casual-t-shirt/ http://my-woocommerce-shop.com/elegant-cotton-polo/
It is also possible to set any permalink base, e.g. you can force the same rewrite base for all WooCommerce links:
# Product categories: http://my-woocommerce-shop.com/clothes/polos/ http://my-woocommerce-shop.com/clothes/t-shirts/ # Product tags: http://my-woocommerce-shop.com/clothes/cotton/ http://my-woocommerce-shop.com/clothes/wool/ # Products: http://my-woocommerce-shop.com/clothes/plain-casual-t-shirt/ http://my-woocommerce-shop.com/clothes/elegant-cotton-polo/
How to edit WooCommerce permalinks?
Step 1. Replace native permastrucutres with custom ones
The first thing you will need to do after Permalink Manager is installed & enabled is to open the plugin’s dashboard (“Tools -> Permalink Manager“) and go to “Permastructures” tab.
In the bottom, you will find a subsection titled “WooCommerce” where the permastructures for Products, Product Categories and Product Tags can be edited.
Now you can replace the permalink bases: /product/, /product-category/ and /product-tag/ with any word or remove it completely. Please always remember to save the new settings with “Save permastructures” button displayed in the very bottom of the page.
The saved settings will be automatically used for default permalinks of new products, categories and tags. To apply the changes to the old permalinks as well, please follow the instructions in the next step.
Step 2A. Reset permalinks of old products
If you would like to use the new permastructures for old permalinks, please go to another section: “Tools -> Regenerate/reset“.
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“
After “Regenerate” button is clicked, a list of updated products’ permalinks should be displayed.
Step 2B. Reset permalinks of old product taxonomies
To reset the Product Categories and Product Tags permalinks please set:
- “Mode” to: “Regenerate custom permalinks“
- “Select content type” to: “Taxonomies“
- “Select post types” to: “Product tags, Product categories“
As was the case with the Product permalinks, the list of updated permalinks will be displayed after “Regenerate” button is clicked.
Translate WooCommerce permalinks
It is also possible to translate the permastructures and set different permalink formats for each language defined with WPML or Polylang. In this article, you can find more information on this.