Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Change Slug in WordPress (Step by Step)

How to Change Slug in WordPress (Step by Step)

Short answer

Open the post or page, click the URL field in the settings sidebar, type the new slug and click Update. Use Quick Edit for faster changes, edit category and tag slugs under Posts, and add a 301 redirect if the old URL was already published.

Key takeaways

  • Edit post and page slugs in the editor sidebar or Quick Edit.
  • Category and tag slugs live under the Posts menu.
  • Author slugs need a plugin, WP-CLI or a database edit.
  • A -2 suffix means another item already uses that slug.
  • Add 301 redirects when changing published URLs.

How do you change a slug in WordPress?

Open the post or page in the editor, find the URL or permalink field in the settings sidebar, type the new slug, and click Update; for categories and tags, edit the slug field under Posts.

A slug is the last part of a URL that identifies one item. In example.com/blog/best-coffee-makers/, the slug is best-coffee-makers.

WordPress creates a slug automatically from the title when you first save a post. You can change it at any time, but changing the slug of a published page also changes its URL.

If you are new to the term, our guide on what a slug is in WordPress explains how slugs relate to permalinks.

What should you check before changing a slug?

Before changing a slug, check that your permalink setting includes the post name, note the old URL, and plan a 301 redirect if the page is already published and indexed.

A few quick checks prevent most problems:

  • Go to Settings > Permalinks and confirm you are not using the Plain structure. With Plain, URLs use ?p=123 and slugs do not appear.
  • Copy the current URL so you can redirect it later.
  • Check whether the page gets search traffic or has backlinks.
  • Make a backup if you plan to edit many slugs at once.

The Permalinks Settings screen documentation shows each structure option. For help choosing one, see our guide on how to set up permalinks in WordPress.

How do you change a post or page slug in the block editor?

In the block editor, open the post, click the URL link in the Post or Page settings panel on the right, edit the slug field, then click Update or Save.

Follow these steps:

  1. Go to Posts > All Posts or Pages > All Pages and open the item.
  2. Make sure the right sidebar is visible. Click the settings icon at the top right if it is hidden.
  3. Select the Post or Page tab in the sidebar.
  4. Click the URL shown next to URL or Link.
  5. Type the new slug in the Permalink or Slug field.
  6. Click Update (or Save draft for unpublished posts).

Labels vary slightly between WordPress versions, but the URL control always sits in the document settings panel.

Use lowercase letters, numbers and hyphens. WordPress converts spaces to hyphens and removes most special characters automatically.

How do you change a slug with Quick Edit?

From the All Posts or All Pages list, hover over the item, click Quick Edit, change the Slug field, and click Update without opening the full editor.

Quick Edit is the fastest way to fix several slugs in a row:

  1. Go to Posts > All Posts or Pages > All Pages.
  2. Hover over the title and click Quick Edit.
  3. Edit the Slug box.
  4. Click Update.

Quick Edit also lets you change the title, date, categories, tags and status at the same time.

How do you change a category or tag slug?

Go to Posts > Categories or Posts > Tags, click Edit or Quick Edit under the term, change the Slug field, and save the changes.

Category and tag slugs appear in archive URLs such as /category/news/. Changing them changes those archive URLs.

  1. Go to Posts > Categories or Posts > Tags.
  2. Hover over the term and click Edit or Quick Edit.
  3. Update the Slug field.
  4. Click Update or Save.

The same pattern works for custom taxonomies registered by plugins or themes. Our guide to editing categories in WordPress covers the full term screen.

How do you change an author slug?

WordPress builds author slugs from the user's login name and gives no built-in field to change them, so you need a plugin or a careful database edit of the user_nicename value.

Author archive URLs look like /author/username/. The slug comes from the user_nicename column in the wp_users table.

Options include:

  • An author slug plugin from the plugin directory, which adds a field to the user profile.
  • Editing user_nicename in phpMyAdmin, after taking a full backup.
  • Using WP-CLI with wp user update to change the nicename field.

The wp user update command reference lists the fields you can change from the command line.

What are the different places to edit a slug?

You can edit slugs in the block editor sidebar, Quick Edit, the taxonomy screens, user tools for authors, and in bulk through plugins or WP-CLI.

ItemWhere to editBuilt-in?
Post or pageEditor sidebar or Quick EditYes
Category or tagPosts > Categories / TagsYes
Custom post type itemEditor sidebar or Quick EditYes, if the type is public
Media attachmentAttachment edit screenPartly, depends on settings
Author archivePlugin, phpMyAdmin or WP-CLINo
Many items at oncePlugin or WP-CLINo

Why won't WordPress let me use the slug I want?

WordPress adds a number like -2 to a slug when another post, page, attachment or item in the trash already uses that exact slug, because every slug of the same type must be unique.

Common causes:

  • A trashed post still holds the slug. Empty the trash or permanently delete it.
  • A media attachment uses the same name. Images often take slugs like contact when you upload contact.jpg.
  • A page and a child page share a slug under the same parent.
  • Some slugs are reserved for WordPress features, such as feed names.

After removing the conflict, edit the slug again and save. If an attachment is the culprit, our guide on disabling attachment pages helps avoid the issue in future.

What happens to SEO when you change a slug?

Changing a published slug creates a new URL, so the old one returns a 404 error unless you add a 301 redirect that sends visitors and search engines to the new address.

WordPress tries to redirect old post slugs automatically. It stores the previous slug in post meta called _wp_old_slug and redirects requests for it. This usually works for posts but is less reliable for pages, categories and changed permalink structures.

For important pages, add a manual 301 redirect. Google explains in its redirects documentation that permanent redirects pass the signal that a page has moved.

You can set redirects with a plugin such as Redirection, an SEO plugin, or server rules. Our step-by-step guide on how to set up 301 redirects in WordPress covers each method.

After changing slugs, also update internal links that point to the old URL. Redirects work, but direct links are faster and cleaner.

How do you write a good slug?

A good slug is short, lowercase, uses hyphens between words, includes the main keyword, and leaves out dates, stop words and anything likely to change later.

Some practical rules:

  • Keep it to three to six words when possible.
  • Use hyphens, not underscores.
  • Avoid years unless the content will never be updated.
  • Remove filler words such as a, the and and when the meaning stays clear.
  • Stay consistent across similar posts.

For example, how-to-clean-a-coffee-maker reads better than how-to-clean-a-coffee-maker-in-2026-the-easy-way.

How do you change many slugs at once?

To change many slugs at once, use WP-CLI or a bulk-edit plugin, test on a staging copy first, and export a list of old and new URLs so you can create redirects.

With WP-CLI you can update one post at a time from a script:

wp post update 123 --post_name=new-slug

The wp post update reference explains the available options. Loop over a CSV of IDs and slugs to handle large batches.

Bulk changes can break many URLs at once. Always pair them with a redirect map and a backup.

What if the new slug shows a 404 error?

If a page shows a 404 after a slug change, resave your permalinks under Settings > Permalinks, clear any cache, and confirm you are visiting the new URL rather than an old cached link.

Resaving permalinks flushes WordPress rewrite rules. Our guide on how to flush permalinks in WordPress shows the steps.

Also clear page cache in your caching plugin, host panel and CDN. Cached pages can keep serving old links even after the slug has changed.

If the problem continues, check fixing permalinks that are not working for server-level causes such as missing rewrite rules.

Frequently asked questions

Does changing a slug affect SEO?

It can. A new slug creates a new URL, so the old address may return a 404 error. Adding a 301 redirect from the old URL to the new one keeps visitors and search engines on track and helps preserve the page's existing rankings.

Why is there a -2 at the end of my slug?

WordPress adds a number when another item already uses the same slug. That item may be a trashed post, a media attachment or another page with the same parent. Permanently delete or rename the conflicting item, then edit your slug again.

Can I change the slug of a published post?

Yes. You can change it any time from the editor sidebar or Quick Edit. WordPress often redirects old post slugs automatically, but adding your own 301 redirect is safer for important pages and for pages, categories and tags.

Why can't I see the slug field in WordPress?

The slug field is hidden when your site uses the Plain permalink structure, and it only appears after a post has been saved at least once. Switch to a structure such as Post name under Settings, Permalinks, then save the post as a draft.

What is the best slug format for WordPress?

Use short, lowercase words separated by hyphens that describe the page and include its main keyword. Avoid dates, special characters and long phrases. Consistent, readable slugs are easier for visitors to share and for search engines to understand.

Sources

  1. Settings Permalinks Screen WordPress.org Documentation
  2. wp post update WordPress Developer Resources
  3. wp user update WordPress Developer Resources
  4. Redirects and Google Search Google Search Central
  5. Redirection WordPress.org Plugin Directory

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.