WooCommerce - excelling eCommerce
[resolved] 404 Error for Cart and other WooCommerce pages (31 posts)

  1. Paul
    Posted 2 years ago #

    I'm using WooCommerce 2.0.3.

    I have a product store set up on my website, http://www.n7hrc.org.

    I can view products and add them to the cart just fine, but I can't get any of the other WooCommerce pages to show any content. When I visit one, like the cart page, I get a 404 error.

    I went into WP Pages admin and verified that the pages are there. I even added text to the cart page, above the [woocommerce_cart] shortcode.

    When in Pages admin, I can click the page to edit it. But If I try to view the page by clicking on the view link under the page, I still get the 404 error.

    I tried changing my permalink structure; that didn't make the pages appear.

    This is the same problem for all sub-pages which were generated by WooCommerce. The only page that doesn't throw a 404 error is the Products/Shop page. All other WooCommerce pages have 404 errors.

    I'm using the theme Canvas 5.1.2 running Framework 5.5.5

    My installed/activated plugin list is:

    Askimet 2.5.7
    All-in-one Event Calendar by Timely 1.9.4-standard
    BAW Login/Logout menu 1.3.2
    bbPress 2.2.4
    bbPress Admin Bar Addition 1.7.1
    bbPress Moderation 1.5
    bbPress Notify 0.2.1
    bbPress Quotes 0.1
    Jetpack by WordPress.com 2.2
    sMember Framework 130221
    WooCommerce 2.0.3
    WooDojo 1.5.2
    WordPress SEO 1.4.2
    WP Category Post List Widget 2.0.3
    WP Super Cache 1.2


  2. Paul
    Posted 2 years ago #

    By the way, I just tried deactivating all plugins except for WooCommerce, then I re-generated the permalink structure, but that didn't make any of the pages show correctly. All WooCommerce pages (except the product page) still return 404 errors.

    Since plugins don't appear to be the problem, I re-enabled all my plugins again as they were earlier today.

  3. Roy Ho
    Posted 2 years ago #

    Anytime you change a setting, you need to flush your cache. Because of the fact you're using a caching plugin. Each cache plugin should have there own reset/flush button to do just that. Take a look at the settings.

    So I would go to permalinks and click on save TWICE. Then go to your caching plugin and do a reset.

  4. Paul
    Posted 2 years ago #

    Thanks for the advice. I don't care too much about the caching, so I just deleted the plugin.

    After deleting the plugin, I saved permalinks twice, like you suggested. Since I no longer have a cache plugin, there is nothing to reset.

    Pages still show "404 Page Not Found".

  5. Roy Ho
    Posted 2 years ago #

    And what is your permalinks setting on? Also note that some caching plugins have lingering files which even after deleting will have and causes issues...I had this problem when I used W3 total cache...Not sure if this applies to super cache.

  6. Paul
    Posted 2 years ago #

    Common Settings: Month and name

    * Category base: [blank]
    * Tag base: [blank]
    * Product category base: product-category
    * Product tag base: product-tag
    * Product attribute base: [blank]

    Product Permalink base:
    * Custom Base: /shop

    (The last one was set by WooCommerce. I had initially set it to "Shop base")

  7. Roy Ho
    Posted 2 years ago #

    Ok if in your permalinks you set it to default ( the first option) save twice...let me know what you see then.

  8. Paul
    Posted 2 years ago #

    Thanks! That works. When the first option is set to Default, the shopping cart works like I expect.

    If I change it to anything but default, it goes back to not working.

    Leaving it at default is a passable solution, but I'd love to figure out how to use pretty permalinks, if possible.

  9. Roy Ho
    Posted 2 years ago #

    Yes, I had you test that so I can determine if this issue is a server issue. It would seem so. Check with your host to see if mod_rewrite is enabled.

  10. Paul
    Posted 2 years ago #

    I'll check into that. Thanks for the direction. I'll post back tomorrow -- or whenever I hear back from my webhost.

  11. Paul
    Posted 2 years ago #

    My host is Hostgator.com, and they do have mod_rewrite turned on. I can't access my .htaccess file directly while I'm at work, so I'll have to see if the rewrite codes are in there after I get home.

  12. Paul
    Posted 2 years ago #

    It is worth noting that all the OTHER pretty permalinks worked fine before I went back to default. (That is to say "blog" and "calendar" and such were all pretty URLs and worked fine. In fact n7hrc.org/shop worked fine. It was just everything lower down than /shop/ that had trouble.)

  13. Paul
    Posted 2 years ago #

    Aha! It seems that I can use the Month and Name common setting, if I switch the Product Permalink base setting to Default.

    That seems to be working fine now.

    Thanks again for your help.


  14. Paul
    Posted 2 years ago #

    Oh. I forgot to mark this as resolved. Now it's resolved.

    Thanks again.

  15. nickzee
    Posted 2 years ago #

    It works like this (for me):

    Settings >> Peralinks >> "Common Settings" = Post name

    Settings >> Peralinks >> "Product permalink base' = Default

    Any other "Product permalink base" option cause the cart 404 error for me. I prefer "Shop base with category".

    Does anyone have the cure?

    @Coen Jacobs

  16. Justina
    Posted 2 years ago #

    I have the same issue.

    My settings are now like this:
    Settings >> Permalinks >> Common Settings = Custom Structure (/%category%/%postname%/)
    Settings >> Permalinks >> Product permalink base = Default

    Any other "Product permalink base" than "default" cause the cart 404 error.

    What is even more interesting, while I now have product permalink base set to "default", my product urls are not "nnn.com/?product=sample-product", they are "nnn.com/product/sample-product"...

  17. Amber
    Posted 2 years ago #

    Exact same issue here. I would like to add this was/is not happening on pre 2.0 WooCommerce installations.

    I'm having an issue with NetworkError: 404 Not Found for core WooCommerce file: woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.3.1

    Settings are currently:

    Settings >> Permalinks >> Common Settings = Custom Structure (/%category%/%postname%/)
    Settings >> Permalinks >> Product permalink base = Default

    Setting Common Settings = Default is the ONLY way that the above mentioned core WooCommerce 2.0 file is getting detected. No other combination of Common/Product Permalink settings will resolve the 404 error.

    This was not an issue prior to 2.0.

    It also appears the above script from WooCommerce 2.0 (when running as Common Settings = Default permalink) is triggering Mod Security 406 Errors on some servers and gets blocked as a [tag "WEB_ATTACK/XSS"]; again doesn't appear to be an issue prior to 2.0

  18. Markus Tenghamn
    Posted 2 years ago #

    Got the same error here. Seeing the same issues as Syrehn.

  19. rhonz10
    Posted 2 years ago #

    Same error here.. mod_rewrite is enabled and loaded.

    I've noticed this when i changed something on the Woocommerce settings and save it. Cart and other WC page goes 404..

    Changing the permalink settings to default is the only way to make it work again but then it's not SEO friendly.. UGLY.

  20. sleepymonk
    Posted 2 years ago #

    This is extremely frustrating!!
    This is working for me now, but I'm not satisfied with it:

    common settings: /%postname%/
    optional: all default settings (no changes)
    product permalink base: default

    However now the permalink shows http://www.mydomain.com/product/productname
    I want http://www.mydomain.com/category/productname

    Breadcrumbs are showing the category correctly but the permalinks are not.

    What's up? If I choose anything other than the default product permalink base, I get the page not found errors.

    Ref: I just upgraded to the latest version of WooCommerce.

  21. sleepymonk
    Posted 2 years ago #

    I also got shop base with category to work
    but if I edit this to be just /%product_cat%, I get the page not found errors again.

    I don't want shop and category, it makes for a very long url!

  22. sleepymonk
    Posted 2 years ago #

    Finally gave up and installed this plugin:

    Seems to work well.

  23. Amber
    Posted 2 years ago #

    I'm not sure if this helps anyone but it was the source of my issues for some of the files not being found:


    It's possible that your webserver has outdated modsecurity rules and they are causing issues with files loading showing up properly.

    The rule ID that appears to be the culprit is 950004 (or at least in my case).

  24. bookchiq
    Posted 2 years ago #

    @Amber, that's exactly what it was for me, too. I'm encouraging my client to switch to a better host, but in the meantime, following Woo's recommended workaround works.

  25. danharding
    Posted 2 years ago #

    common settings: post name
    product permalink: default

    Also the only way i could get it working. Never had this problem in using WooCommerce since its inception.


  26. baligooglebook
    Posted 2 years ago #

    Thanks God I found this discussion on google search page. I was almost to reinstall the entire wordpress installation. Finally, just play with the default permalink structure of the product has solved the problem with cart page (404 page not found). Cheers My friend keep sharing useful experience with friends.


  27. sudwebdesign
    Posted 1 year ago #

    I finally found a cure for this (the 404 error not the whirly icon) and don't understand why but it seems to work ... for me anyway.

    I created a new page eg: called "Orders"

    I then edited the "Checkout" page and changed the parent from "Product" to "my new "Orders" page. Did the same for all other children of the "Product" page (Transactions and Your Account).

    Go to your home page, refresh and click checkout and it should all work!

  28. lucykelly
    Posted 1 year ago #

    I am having a similar problem
    my site is http://www.lucindagrace.com
    Wp version 3.8

    my woo commerce pages are going to 404 undefined page

    This is a sample product page
    if you click add to cart, a window pops up but when you click proceed to checkout it goes to 404 error and cannot find page

    another example going to 404

    - my pages are matched in the woocommerce pages settings

    - Following the comments above I have tested changing back the permalinks to default but not with any satisfactory results
    - I also tried changing page heirarcy as mentioned above but didnt seem to help either.

    Not sure what else to do? Please can you help?


    Installed Plugins:
    LayerSlider WP by Kreatura Media version 4.6.3,
    Akismet by Automattic version 2.5.9,
    Contact Form 7 by Takayuki Miyoshi version 3.6,
    Envato WordPress Toolkit by Derek Herman version 1.4,
    Google XML Sitemaps by Arne Brachhold version 3.4,
    MNKY Vector Icons Plugin by MNKY Studio version 1.2,
    Revolution Slider by ThemePunch version 4.1.4,
    WooCommerce by WooThemes version 2.0.20,
    WordPress SEO by Joost de Valk version 1.4.22

  29. lucykelly
    Posted 1 year ago #

    In case its of significance my permalink settings are:

    Custom structure

    Product permalink base:

  30. dfoliver0
    Posted 1 year ago #

    I, as a very new newbie, had the same Woocommerce 'page not found' error on products, etc. I can't begin to tell you how utterly frustrating THAT was. Thanks for your resolution. I may live to see yet another fine day. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic