Does Flushing Rewrite Rules Fix WooCommerce 404s?
What WooCommerce Rewrite Rules Actually Do
Rewrite rules translate a human-readable URL (like a product's permalink) into the actual underlying query WordPress uses to find and display that content. This map is generated and cached, only needing regeneration when the URL structure itself changes — a new custom post type registered, a changed permalink setting, or a plugin adding new URL patterns. Flushing forces this regeneration, correctly fixing 404s caused specifically by an out-of-date map.
Why This Isn't a Performance Fix
- Rewrite rules affect only whether a URL resolves correctly, not how fast the resulting page loads once it does resolve — conflating the two is a common but mistaken assumption.
- Flushing rewrite rules is itself a moderately expensive operation, since it involves regenerating and re-saving the entire rules structure, meaning it shouldn't be done casually or repeatedly.
- A poorly coded plugin flushing rewrite rules on every single page load (rather than only when actually needed) is a genuine, if uncommon, performance problem worth identifying and fixing.
- 404 errors and slow pages are separate problems with different causes and different fixes, even though both can affect the same page.
Using This Correctly
- Flush rewrite rules only after a genuine structural change (new post type, permalink setting change), not as a general troubleshooting reflex.
- Investigate separately if a page is both 404'ing and would otherwise be slow, since these need different diagnostic approaches.
- Check for a plugin flushing rules excessively if performance profiling reveals this as a repeated, unnecessary operation.
Need broken permalinks or performance issues diagnosed correctly? See WordPress speed optimization.