Refreshing permalinks to fix 404 errors
If pages that should exist return a 404 error, refreshing permalinks usually fixes it. WordPress keeps an internal list that matches each URL to its content. Installing a plugin that adds new content types (events, people, documents), changing the site's URL pattern, or moving the site can leave that list out of date. Saving the permalink settings rebuilds it.
This is different from changing one page's address. For that, see Changing permalinks and URL slugs.
When to refresh
- Event, portfolio, or other plugin pages return a 404 after you activate the plugin.
- URLs stopped working after a migration or domain change.
- A plugin tells you to "flush permalinks" or visit Settings → Permalinks.
There's no need to do this on a schedule. Do it when something breaks.
Refresh permalinks
- Go to Settings → Permalinks.
- Leave the structure as it is. Most Dirigible sites use Post name.
- Click Save Changes.
Saving without changes is enough. Retest the URLs that were failing.
If URLs still return 404
- Confirm the page or post is published and the slug is what you expect.
- Clear your caching plugin or CDN cache, then try again.
- For old URLs that have moved on purpose, add a redirect.
- If every URL except the homepage 404s after saving, your host may be blocking WordPress from updating its server settings. Contact hosting support.
Changing the URL pattern
Switching the structure under Settings → Permalinks on a live site changes every post URL and breaks existing links. If you must switch, plan redirects first.