Why posts or products return 404 while the homepage works
If the homepage opens but individual posts or products return 404, first confirm that the content exists at the expected URL. Then review the site’s existing permalink rules without changing its public URL structure unnecessarily.
Check the failing address
Section titled “Check the failing address”Open the item in the dashboard. Verify publication status and its current slug, then use its published link. Check whether the issue affects one item or every item of that type, and whether it began after a restore, migration, or plugin change.
For custom content types, check for a conflicting page or content slug. Also confirm that the plugin responsible for the content type is active. Do not assume every 404 has the same cause.
Refresh the current rules
Section titled “Refresh the current rules”- Ensure a current backup is available and record the existing setting in Settings → Permalinks.
- Save the current permalink configuration to refresh rewrite rules. Keep the intended URL structure unchanged during this initial check.
- Reopen the exact failing URL in a logged-out window.
- If the issue remains, give your host the example URLs and ask it to review the server’s rewrite handling.
Apache and Nginx configuration are different. A sample .htaccess rule cannot be applied to every host, and manually replacing server rules can affect other behavior. Use hosting support if you are not responsible for that configuration.
Check whether the fix lasts
Section titled “Check whether the fix lasts”Test another item and repeat the operation that originally triggered the problem, preferably on staging. If saving permalinks only provides a temporary fix, investigate the underlying plugin, theme, or server behavior rather than repeatedly saving as a permanent workaround.
A genuinely changed URL may need a redirect, but changing all permalinks is not the default solution to this symptom. For unpublished or restricted content, see page visibility.