Broken Permalinks on Your Directory: Why Listing URLs 404 (and the Fix)

Directories & Niche Publishing

The homepage works. The main pages work. But click into an actual listing and you get a 404 — page not found — for a page you can plainly see exists in your dashboard.

It's a weirdly unsettling bug, because nothing's gone. The listing is right there. The content is in the database. It's just that the address suddenly leads nowhere, like the building's still standing but somebody took down all the street signs.

That's almost exactly what's happened. WordPress doesn't store a real file for each listing — it builds the page on the fly when someone visits that URL, and it figures out which listing to build by matching the URL against a set of rules called rewrite rules. Your directory plugin adds its own rules so that /listing/joes-plumbing/ knows to load Joe's listing. When those rules go missing or get out of sync, the URL no longer matches anything, and WordPress does the only honest thing it can: 404.

The rules fall out of sync for a handful of reasons:

  • The structure changed and never got refreshed. You (or a plugin, or an update) changed the permalink settings, and the rewrite rules didn't get rebuilt.
  • A migration or restore brought the content but not the rules. Very common after moving hosts or pulling a backup.
  • A slug collision. The base your listings live under — say /directory/ or /listing/ — is also the slug of an actual page you created. Now two things claim the same path and the listing loses.
  • A plugin or theme conflict ate the rules after an update.

Here's the fix that solves most of these, and it's almost insultingly simple: go to Settings → Permalinks and click Save. You don't have to change anything. Just saving forces WordPress to rebuild all the rewrite rules from scratch, and the listing URLs usually come right back. This is the first thing to try, every time, before you touch anything else.

If that doesn't do it, you're into the less-common causes. Check whether your directory's URL base collides with an existing page slug — if it does, rename one of them. Check that the directory plugin is actually active and registered its rules (deactivating and reactivating it re-registers them). If you're on a custom server setup, make sure the rewrite rules can actually be written and read. And if it broke right after an update, the update is your suspect — isolate what changed.

The reassuring part: broken permalinks look catastrophic and are usually trivial. Your data is fine. The pages are fine. The signs just need to be put back up, and most of the time one click does it.

If you've re-saved permalinks, ruled out a slug collision, and the 404s are still there, something more specific is going on — a rule conflict or a server-level issue — and that's worth a real look. But try the Save button first. It's free and it works more often than it has any right to.