in Elftronix

How To Fix WooCommerce Shop Base Permalink 404 Error

I saw loads of posts from people having problems with WooCommerce product pages resulting in a 404 after fiddling with the permalink settings. I was scratching my head on this one for a while as well. Here is how I solved the problem.

WooCommerce 404 Error

I am now using the excellent WooCommerce Permalink Plugin which not only fixes the 404 error but gives me total control over the permalinks. And a whole bunch of useful features to easily change to a pretty URL structure!

I wanted to give products the following permalink structure:

But all the product pages were giving the HTTP 404 “Page not found” error.

The problem was, that I had set the “Product category base” as what I wanted the “Shop base” permalink structure to be (“shop“).

In other words. If you go to “WordPress Dashboard -> Permalinks“, and want to set the “Product permalink base” setting to “Shop base” or “Shop base with category“, leave the “Product category base” setting alone.

To make this absolutely clear, according to my observations, to set up a “shop base” permalink structure with WooCommerce, you don’t need to set up anything in the “Optional” permalink settings.

Care and share, let's call it fair! -David

Twitter Button Facebook Button Google Button LinkedIn Button

Write a Comment



      • Wow, this was really helpful. Thanks a lot for sharing it. I don’t know why the permalink is always 404 of the categories, but now when I changed it in the main setting, everything is fine. Great post, dude. All the best and keep sharing such information, specially for the woocommerce stuff.

  1. This just saved my life man. The only thing I’d recommend is dropping the screenshot in your actual post above so it’s easier to access. I was having this same issue with woo commerce, wmpl and woocommerce multi-lingual, and every time I changed the language, the single product page was broken whether I clicked from the shop page or clicked on it from the dashboard.

    This was great! Thanks!

  2. I spent hours on exactly the same problem and there was that “optional” setting staring at me all along. Thanks so much for posting this, you’ve saved me a *very* late night. 🙂

  3. Thank you so much!
    With this tutorial I fixed my problem in 5 minutes after hours of unsuccessful search!
    You saved my day!


  4. What about if you want it to say “shop” instead of “category” on product categories? There’s a conflict if you make the product category “shop” like the product permalink base. I have been looking for some code snippet to add into my theme to fix this, but there doesn’t seem to be one. I just want anything in the purchase path to be under .com/shop. :-\

    .com/shop — (works)
    .com/shop/{product-category} — (doesn’t work)
    .com/shop/{product-category}/{product} — (works)

      • Neha, did you ever find anything here? I’m in the same boat. I feel like it has something to do with similar slugs across categories and products. I had it working, as Nathan describes, and after adding a bunch of products, I get the 404 on .com/shop/{product-category}

  5. I have exactly the same problem Nathan as well.
    I’m trying to use the base ‘shop’ for categories & products. But unfortunately this will give an error in the category pages.
    The only, but still worthless, solution is to change the base of the categories with ‘Shop’ (Capital ‘S’)

    .com/shop — (works)
    .com/Shop/{product-category} — (Only with capital ‘S’ works)
    .com/shop/{product-category}/{product} — (works)

    For SEO purposes this cannot be a good idea, since google will track this link as a totally different one from the original ‘shop’ base.
    I therefore don’t use this structure… but I’m still looking for a right solution.

  6. I’m 3rd to Nathan’s problem. I’m trying to use the same slug for product category base and shop base. Looks like WooCommerce doesn’t support it.

  7. thanks!!!!! btw: I like the slide to unlock feature against spam robots, but in chrome on a mac (all updated) it works not very well, tried 5 times….

  8. Thanks! I realized after reading this post I was getting a 404 error clicking on my product tag cloud because I had customized the product tag base permalink. When I deleted my customization, it went back to default after saving and the 404 error went away. Yea!

  9. David – does the WooCommerce Permalink Plugin actually fix the problem described by Nathan, allowing you to use the same name eg. “shop” for “product category base” and for the “product permalink base”?
    I’m currently using Roel’s fix with a capital S, as that seems like a better match than having the default “product-category” in the permalink.
    Thanks 🙂

    • Thanks for asking! Yes, this problem is fixed with the plugin.
      It removes the /product & /product-category slugs completely. Then you can set a base url “shop”, so that everything is under the path like Nathan wanted.

  10. I had a problem that made my shop into one big loop. Main shop page led to Category page led to main shop, etc. This simple article fixed it for me. Thank you! Took me too long to figure out.

    In short: Go to wp-admin -> settings -> Permalinks

    Under Product Permalinks find the Custom Base setting and put it on ‘shop’, or whatever you want.

    That fixed this for me.