A 404 error on WooCommerce is usually fixed fairly easily by clearing your browser cache and your site cache so that the latest version displays correctly.
If that is not enough, the problem most often comes from permalink management, or from badly redirected or duplicate URLs.
I have even sometimes been my own victim, having forgotten that I hadn’t published a product and not understanding why it wasn’t showing publicly.
The universal cache problem
When caching is enabled on your site, or when you use a CDN service, a version of our site is stored and shown to visitors. This displays it faster and so improves the user experience.
The same goes at your level, that of your browser. A version may be stored locally without you knowing, so that it displays faster later.
So before anything else, and after every step listed below, you should clear all the caches involved in your setup: your site’s or your CDN’s if you use one, and your browser’s.
This should solve most 404 errors on WooCommerce.
The basic checks
Once the cache issue is settled, the first thing to do to fix a 404 on WooCommerce is to go to “Settings” > “Permalinks” and click “Save changes” straight away. This regenerates the permalinks.
Most of the time, this is enough (remember to clear all your caches, okay).
As mentioned in the intro of this post, you may also not have published the product in question, or you may have deleted it. Check that it is online.
If it is, check that you are visiting the right URL for this product by checking it from your WooCommerce dashboard.
Compatibility problems
As is often the case, your ecosystem may be the cause of your 404.
- Deactivate your plugins one by one, then reactivate them one by one. When the problem reappears, the last plugin you reactivated is the source of the problem.
- If that is not enough, switch to a default WordPress theme. If the 404 disappears, your theme is the problem.
Once the problem is spotted, write to the plugin or theme developer to tell them that what they built is generating bugs.
Well, sometimes it will have nothing to do with their code but rather with your installation. But it can help you fix the problem quickly, and they will fix it themselves.
If you want to dig deeper into the subject, the WooCommerce documentation on permalinks (in English) remains the reference.
Watch out for .htaccess
Your .htaccess file may be the culprit, redirecting your URLs to the wrong place and generating the 404s.
Copy and paste its content into ChatGPT and ask it for help. It is quite likely that it won’t be conclusive because it doesn’t have the global context of your site.
Solution: call Jennifer, she will be able to analyse everything easily.
A database problem
You may have indexing problems with your database.
This means that when you update or create a product, it isn’t really saved on your server.
As a result, it isn’t taken into account and the product (or its changes) isn’t visible on your site.
To fix this problem, you can use a database reindexing tool such as WP-CLI, but I advise against it because it is quite technical.
Would you rather stop dealing with these breakdowns yourself? See my WooCommerce maintenance : tested updates, verified payments and troubleshooting for your store.