How to change a WordPress post's URL slug without losing traffic
To change a post's slug, edit Slug in Quick Edit or the editor sidebar and update the post. WordPress remembers the old slug of a published post and 301-redirects it to the new address. It does not do this for pages or for category and tag slugs, so those need a redirect from you.
The slug is the last part of the address: espresso-beans-guide in /espresso-beans-guide/. Changing it on a post that already ranks moves the page to a new URL, and everything depends on the old one forwarding cleanly.
Step by step
1. Check whether the change is worth making
A slug change resets nothing by itself, but Google has to recrawl, follow the redirect and carry signals over, which takes time. Change a slug when it is wrong or misleading: a typo, a year that has passed (best-grinders-2023), or auto-generated text such as post-2. Do not change a slug only to add a keyword to a page that already ranks.
2. Edit the slug
On Posts → All Posts, hover the post, click Quick Edit, change Slug and click Update. In the block editor, the same field is in the post's settings sidebar, in the summary panel at the top. Use lowercase words separated by hyphens. WordPress cleans what you type: spaces become hyphens and most punctuation is removed. If another post already uses the slug, WordPress appends -2.
3. Understand what WordPress redirects for you
When the slug of a published post changes, core saves the previous one in a hidden _wp_old_slug field on that post. When a request for the old address ends in a 404, core looks the slug up and answers with a 301 to the post's current permalink. Every old slug is kept, so a post renamed three times still forwards from all three. If you later give the post one of its old slugs again, that entry is removed from the list.
The limits, taken from how the feature is written:
- Published posts only. A draft's slug changes are not recorded, and they do not need to be.
- Non-hierarchical post types only. Posts and most custom post types qualify. Pages do not.
- The slug only. Changing the category in a
%category%URL, or the permalink structure, is not covered.
4. Cover pages and terms
For a page, a category or a tag, add the redirect yourself, or let the plugin do it. Switch on Auto Redirection at the top of Hydrogen SEO → Redirections. From then on, when the URL of a post, page or term changes, the plugin adds a 301 rule from the old address to the new one, tagged Auto, which you can edit or pause like any other rule. Turn it on before you edit the slug, since it records changes as they happen.
Without the plugin, add a line to .htaccess above the WordPress block:
Redirect 301 /old-page/ https://example.com/new-page/
5. Mind child pages
Changing a parent page's slug changes the address of every child page under it: /services/audit/ becomes /what-we-do/audit/. Each child needs its own redirect. List the children first under Pages, filtered by the parent, and test each one afterwards.
6. Test the old address
curl -sI https://example.com/old-slug/ | grep -iE "^HTTP|^location"
You should see one 301 and the new URL. A 404 on a post is worth a cache purge first, in case a caching layer stored the 404 before the slug changed. A 404 on a page means no redirect exists yet.
7. Update internal links
Links inside your own content still point at the old slug. They work, through a redirect, but internal links should go straight to the final URL. Search your posts for the old slug in Posts → All Posts and fix the ones you find, starting with menus and high-traffic posts. With Hydrogen SEO's link counter on, the ↙ count in the SEO column of the Posts screen shows how many posts link to the entry, which tells you how many places there are to check.
What happens in Search Console
The old address moves to Page with redirect in the Pages report and the new one is indexed after Google recrawls it. To speed that up, inspect the new URL and click Request indexing. The XML sitemap lists the new address straight away, since it is built from current permalinks.
Mistakes that cost traffic
- Changing the slug twice in a week. Each change adds a redirect. Decide once.
- Reusing the old slug for a different post. The new post takes the address, and the redirect to the renamed post stops working.
- Relying on core's redirect for a page. It never fires for pages. This is the most common cause of a 404 after a "small" URL tidy-up.
Common questions
Does WordPress automatically redirect when I change a slug?
For published posts and other non-hierarchical post types, yes: the old slug 301-redirects to the new URL. For pages and for category or tag slugs, no.
Will I lose rankings if I change a URL slug?
With a working 301 the page usually keeps its position after a short period of reprocessing. Without a redirect, the old URL returns 404 and its rankings and links are lost.
Should I remove stop words from slugs?
Short slugs are easier to read and share, but there is no ranking gain large enough to justify changing the slug of a page that already performs.