How to customize permalinks and manage redirects in WordPress
Use Settings → Permalinks to choose your site-wide URL structure, then edit individual post or page slugs from the editor. WordPress does not provide a full redirect manager, so changed URLs need server rules, code, or a redirect plugin to avoid 404 errors.
- 01Plan the URL structure
- 02Set the site-wide structure
- 03Edit individual slugs
- 04Add redirects for changed URLs
- 05Refresh and test the rules
- 06Use a manager for large changes
What you need
- Administrator access to WordPress
- A recent site backup
- A list of old and new URLs
- Hosting or server access if you will add redirects manually
Plan the URL structure
Decide whether your URLs should use post names, dates, categories, or another structure. For most sites, Post name keeps URLs short and readable. Avoid changing the structure repeatedly because every change can create old URLs that need redirecting.
Write down any important URLs you plan to change. Check for duplicate slugs, especially where a page, post, category, or custom post type could compete for the same path.
Set the site-wide structure
In the WordPress dashboard, go to Settings → Permalinks. Choose a common structure or enter a custom structure using tags such as %postname%, then click Save Changes. WordPress also lets you change the category and tag bases on this screen.
Do not paste your full domain into the custom structure field. Use the structure tags only. If the new URLs return 404 errors, your hosting configuration may not support pretty permalinks, or the rewrite rules may need refreshing.
Edit individual slugs
To change one URL, open the post or page in the editor and edit its URL or slug field. Use lowercase words separated by hyphens, remove unnecessary dates or filler words, and keep the slug aligned with the page topic.
Changing a slug changes the public URL. Do not assume the old address will always redirect correctly, particularly after migrations, permalink-structure changes, or conflicts with plugins and server rules.
Add redirects for changed URLs
WordPress core has no general dashboard screen for creating and auditing arbitrary redirects. For a small number of permanent changes, add server-level 301 rules in Apache or Nginx, or add redirect logic in code. If you write PHP redirect logic, use a safe local redirect and stop execution immediately afterwards; WordPress documents this pattern for wp_safe_redirect().
Use a 301 redirect when a URL has moved permanently. Redirect each old URL to its closest relevant replacement, not automatically to the home page. Back up the server configuration first: a misplaced rule can create redirect loops, redirect every page, or make the site unavailable.
Refresh and test the rules
Visit Settings → Permalinks after changing permalink settings and save the screen, even if you do not change a setting. This refreshes WordPress rewrite rules. WordPress notes that visiting the screen triggers a rewrite-rule flush.
Test the homepage, posts, pages, categories, tags, custom post types, feeds, XML sitemaps, and several old URLs in a private browser window. Check that each old URL returns one direct 301 to the correct new URL rather than a chain of redirects or a 404.
Use a manager for large changes
The manual route is fine for a small site with a stable URL structure and a handful of redirects. It becomes difficult when you need to edit many posts, pages, taxonomies, or WooCommerce products while keeping a searchable history of URL changes.
Permalink Manager Pro is the fast route for complex URL structures. It provides bulk permalink editing for posts, pages, custom post types, and taxonomies, plus redirect management and logs. Use it when manual server rules would be time-consuming to maintain, but still review and test its generated URLs before deploying them.
Let Permalink Manager Pro do it
Bulk permalink editing with redirect logs and WooCommerce support; best for complex URL structures across posts, pages, and taxonomies.
Sources
- wordpress.org /documentation/article/settings-permalinks-screen/?utm_sourc…
- developer.wordpress.org /reference/functions/wp_safe_redirect/?utm_source=openai
- developer.wordpress.org /advanced-administration/wordpress/common-errors/?utm_source…
Questions
- Does WordPress automatically redirect every changed slug?
- No, WordPress does not provide a guaranteed redirect for every changed slug or permalink structure. Some simple slug changes may be handled by built-in canonical behaviour or another plugin, but you should create and test an explicit 301 redirect for important URLs. This is especially important after migrations, taxonomy changes, or changes involving custom post types.
- What is the best permalink structure for SEO?
- For most WordPress sites, the Post name structure is a practical choice because it produces short, readable URLs without dates. The best structure is the one that matches your content and can remain stable. Changing a working structure later creates redirect work, so choose carefully rather than changing URLs for minor SEO gains.
- Why do my WordPress permalinks return 404 errors?
- 404 errors commonly occur when rewrite rules were not refreshed, the server is missing the configuration needed for pretty permalinks, or a page and custom post type share a conflicting slug. Visit Settings → Permalinks and save the settings first. If that fails, check the server rules,.htaccess or Nginx configuration, and recent plugin or theme changes.
- Should I redirect old URLs to the homepage?
- Usually no. Redirect each old URL to the closest matching new page so visitors and search engines receive the same information they requested. Sending unrelated URLs to the homepage can confuse users and weaken the usefulness of the redirect. If no relevant replacement exists, returning a proper 410 or 404 may be more honest than redirecting to an unrelated page.
- Do I need a plugin to manage WordPress redirects?
- No, you can manage a small number of redirects with Apache or Nginx rules, or with carefully written WordPress code. A plugin becomes useful when you need bulk URL editing, redirects across posts and taxonomies, redirect logs, or WooCommerce support. For those larger jobs, Permalink Manager Pro is the faster route than maintaining many manual rules.