URLs & Slugs

How to Edit URL Slugs in WordPress

Set up SEO-friendly permalinks in WordPress, edit post and page slugs, and avoid common slug mistakes such as numbered duplicates.

WordPress creates slugs automatically from your post titles, but the defaults are not always ideal. A few settings and habits produce much cleaner URLs.

Step 1: Choose a permalink structure

Go to Settings > Permalinks. The Post name option gives clean URLs such as example.com/my-post-title. Avoid "Plain" (?p=123). Choose your structure when you first set up the site; changing it later affects every URL.

Step 2: Edit the slug before publishing

In the block editor, open the post settings panel and find the URL or permalink section. You can edit the slug there. WordPress builds the initial slug from the full title, including stop words and numbers, so shorten it if needed.

Step 3: Use clean, focused slugs

Title: "The 7 Best Indoor Plants for Low-Light Apartments (Updated)"

  • WordPress default: the-7-best-indoor-plants-for-low-light-apartments-updated
  • Better: best-indoor-plants-low-light

Paste your title into the slug generator, turn on stop-word removal and set a maximum length to get a clean suggestion, then copy it into WordPress.

Common mistakes

  • Numbered duplicates such as my-post-2. WordPress adds a number when a slug already exists, including in the trash or in media attachments. Check for an older post or image with the same slug.
  • Changing slugs after publishing without a redirect. Many SEO plugins add redirects automatically; confirm yours does.
  • Accented characters left in slugs, which turn into encoded strings such as %C3%A9 when shared.

Categories and tags

Category and tag slugs appear in archive URLs. Keep them short and lowercase too: /category/recipes/ rather than /category/our-favorite-recipes-and-meal-ideas/.

Frequently asked questions

How to change permalinks in WordPress?

How to change permalinks in WordPress: go to Settings > Permalinks and choose "Post name". These WordPress permalink settings give clean URLs. Change the structure only on new sites, or add redirects.

How to edit a slug in WordPress?

How to edit a slug in WordPress: open the post, find the URL or permalink field in the post settings panel and edit the WordPress slug. The post name permalink then uses your edited slug.

Why does WordPress add numbers to slugs?

WordPress slug numbers such as "-2" appear when the slug is already taken by another post, a page, a trashed post or a media file. Empty the trash or rename the older item to free the slug.

Try the free Slug Generator

Turn titles into clean, SEO-friendly URL slugs with bulk mode and smart trimming.

Open Slug Generator