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.
Update: 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.
Please note: Check the comments for plenty of useful information..