Home / Blog / SEO / WooCommerce Permalinks Manager: remove product-category, shop slag from URL

WooCommerce Permalinks Manager: remove product-category, shop slag from URL

30 August 17
Reading Time: 4 minutes
14 Comments
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes)

 

Woocommerce Permalinks Manager is developed to improve current WooCommerce url configuration features and provide better display and extra capabilities for your online store SEO, according to the WooCommerce SEO Audit we conducted recently.

Major Plugin features:

  • Removing /product-category base from URL
  • Removing /product from URL
  • Removing all the prefixes from URL, leaving just the category or product name

Besides testing the basic plugin features, first of all, we tested how it works with the following:

  • Basic WooCommerce features
  • Yoast
  • WPML WooCommerce Multilingual

With the development and adaptation of other features from our Features List, all of them will be tested for compatibility with the Permalink Manager.

You can install this plugin from the official WordPress plugin directory .

Woocommerce Permalinks Manager Demo

You can see how it works on the Storefront theme here: https://storefront.premmerce.com .

You can see how it works on the SalesZone theme here: https://saleszone.premmerce.com .

Plus, you can create your personal demo store and test this plugin together with Premmerce Premium and all other Premmerce plugins and themes developed by our team here: Premmerce WooCommerce Demo.

Installation

  1. Unzip the downloaded zip file.
  2. Upload the plugin folder into the “wp-content/plugins/” directory of your WordPress site.
  3. Activate “WooCommerce Permalink manager” from Plugins page.

Woocommerce Permalinks Manager page in admin panel

Woocommerce Permalink Manager

URL customization for the categories

The product child category URL before customization looks like the following screenshot:

The plugin allows customizing the product category URLs as follows:

Remove the /product-category/ base with the following steps:

1. Activate Remove base checkbox in the Category section on the Url settings page.

2. To save the changes click Save Changes button.

Here is what you get:

Before: http://wp.loc/product-category/accessories/action-figures/

After: http://wp.loc/accessories/action-figures/

 

Remove parent category taking the following steps:

  1. Activate Remove parent slugs checkbox in the Category section on the Url settings page.

    2. Click Save Changes button to save changes.

Here is what you get:

Before: http://wp.loc/product-category/accessories/action-figures/

After: http://wp.loc/product-category/action-figures/

Remove (product-category) base and parent category in the following way:

  1. Activate Remove base and Remove parent slugs checkboxes in Category section on the Url settings page.

    2. Click Save Changes button.

Here is what you get:

Before: http://wp.loc/product-category/accessories/action-figures/

After: http://wp.loc/action-figures/

 

URL customization for the products

The product page on the site before URL customization:

Woocommerce Permalinks Manager allows customizing product URLs in the following way:

Remove base (shop or product) by taking the following steps:

  1. Activate Remove base checkbox in Product section on the Url settings page.

    2. Click Save Changes button.

Here is what you get:

Before: http://wp.loc/shop/accessories/action-figures/acme/

After: http://wp.loc/accessories/action-figures/acme/

 

Using “Yoast SEO” primary category URL for the product with multiple categories

Yoast SEO allows you to choose a primary category if the product has a few of them. The screenshot below shows that the primary category is not attached to the product URL.

If you need the product URL to be displayed in the primary category, take the following steps:

  1. Install and activate Yoast SEO free version.
  2. Choose “Shop base with category” in the Product permalinks on the Permalink Settings page.
  3. Install and activate Woocommerce Permalinks Manager plugin.
  4. Go to the Edit page of a product, connected to multiple categories. As you can see on the screenshot below, primary category attaches to the product URL.

Here is the result:

Yoast SEO XML Sitemap

All the changes made through Woocommerce Permalink Manager are also incorporated in Yoast SEO XML Sitemap.

Further work and plugin development

We will be very grateful if we get your feedback and thoughts on developing the plugin. We shall take into account all of your ideas. As we continue developing our products, we will test the plugin to add new features to it, if needed.

Check also our Yoast WooCommerce SEO Addon if you want to improve your store SEO.

Comments (14)
  • DRKMTTR Creative says:

    I love how easy this is to use, however is it possible to make the plugin LEAVE “/shop/” in the URL and only remove “product-categories”? We are looking for a way to make /shop/category/product/ URLs without having “product-category” and this plugin seems to remove too much of the URL.

    1. Ivan Pylypchuk says:

      Thanks for your replay. With this plugin is possible to leave any slug, you need, just play with different settings.

  • Steve Downs says:

    I just tried to activate the plugin and I get the following error:

    Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /Applications/AMPPS/www/princess/wp-content/plugins/woo-permalink-manager/premmerce-url-manager.php on line 40

    I’m running WP 4.8.3 with WooCommerce 3.2.3

    1. Steve Downs says:

      Problem solved. I was running on old version of PHP on my local AMPPS server. Now activates fine

  • Miguel says:

    Hi, the plugin works perfectly but I have an issue with one of my languages.

    In all languages (es,en,it,de) works fine but in pt only works with categories, the product page have the slug “produto” (pt/produto/someproduct).

    Thanks.

    1. Ivan Pylypchuk says:

      Hi, we will test it and when we will find solutions, I reply you, Thanks for question.

  • John Digweed says:

    Hi Ivan,

    I installed your plugin to: Remove the /product-category/ base.

    Here is what you get:

    Before: http://wp.loc/product-category/accessories/action-figures/

    After: http://wp.loc/accessories/action-figures/

    However, when I click on the product category:

    It now shows: http://wp.loc/#accessories

    Is this normal? Why the hastag?

    This happens to all the product categories upon clicking.

    1. Andrew Kruk says:

      Hi John,
      No, it’s not the way as plugin must works.
      But we can’t reproduce this. Where exactly you see hastag? Can you show some examples?

  • Dario Ferrer says:

    Hello, thanks for this useful plugin. Just reporting a little bug that shows on multisite. When I network activate the plugin, the nag “The WooCommerce Permalink Manager plugin requires…” still remains. I solved this (looks fine on my end) modifying a bit the function validateRequiredPlugins() located in UrlManagerPlugin.php, line 126:


    private function validateRequiredPlugins(){

    /**
    * Check if WooCommerce is active
    **/

    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );

    $plugins[] = 'WooCommerce';

    if( is_plugin_active( 'woocommerce/woocommerce.php' ) or is_plugin_active_for_network( 'woocommerce/woocommerce.php') ) {
    $plugins = [];
    }

    return $plugins;
    }

    – Tested succesfully on a multisite installation on localhost. I imagine that will work on single sites.
    – The method “if(!in_array(‘woocommerce/…” is outdated. I replaced it with “is_plugin_active…” (please read the link below for more information).
    – Also I changed the negative declarations (!) por positive ones (do not pay so much attention to this. Manias)

    Link: https://wp-buddy.com/blog/check-wordpress-plugin-sitewide-active-network-active/

    1. Andriy Kruk says:

      Hi Dario,

      Thanks for your help!
      In the next release, we will definitely add multisite validation.

  • Radim says:

    Hi Ivan, this plugin is exactly what I have been searchin for, thanks! But I think, there is one issue which needs to be solved.
    You can tesi it via https://httpstatus.io
    For example when plugin is disabled and if I have http://www.domain.com/product/blue-shirt and if I test http://www.domain.com/product/SOMETHING/blue-shirt it will be redirected 301 to product page. It is OK.
    But when I use your plugin, slug product will be removed, but when I test http://www.domain.com/SOMETHING/blue-shirt there is no redirection to product page which can result in duplicity bad for SEO.
    Please advise which code needs to be changed.
    Regards, Radim

    1. Andrew says:

      Hi Radim,
      Thanks for your feedback.
      Unfortunately this plugin doesn’t work with 301 redirects, but it works with Yoast SEO plugin and if you use it, these pages will be configured like canonical.

  • Azmi says:

    Hi, i have installed the plugin..

    This is my website, http://www.buybuy.sg

    I have removed the base for product-category and it is working fine for all categories except for this one

    http://www.buybuy.sg/product-category/bathtubs-singapore-portable/

    I am not sure why for this just particular 1 category it is not working

    1. Andriy Kruk says:

      Hi, Azmi

      As we see, URL is formed correctly – http://www.buybuy.sg/bathtubs-singapore-portable/
      But when I go to this page, I redirect (by 301 redirect) here – http://www.buybuy.sg/product-category/bathtubs-singapore-portable/
      Our plugin can’t make a redirect, thats why we can assume that you are using some plugin for redirects, check it in your WP dashboard

Leave a Reply

Your email address will not be published. Required fields are marked *

Create Your Personal Premmerce Demo Store
Sign up for updates

Be the first to know about Premmerce development and project news

You have successfully subscribed to our mailing list. Thank you!