What is: Post Slug

The post slug is the user friendly and URL valid name of a post. Most common usage of this feature is to create a permalink for each post. WordPress automatically generates post slugs from a post’s title. However, it is not used in the URL until custom permalinks are enabled for use ” %postname%” in the URL structure. Permalinks can be enabled from Settings » Permalinks. Once this is done the slug will substitute the “%postname%” placeholder in the custom permalink structure.

Once the permalinks are enabled, the post URL will appear below the post title in the Post Edit screen, like this:

Post slug appearing in the url in post edit area

Post slug can also be changed from the posts page by clicking on the Quick Edit button below a post. This opens the quick editor below the post title where a user can change the post slug among other things.

If the post title is really long or it changes often then a post slug can be especially useful.

Once it is defined and the post is published, the post slug should not be changed. If it is changed then the same content will be published on multiple pages and any links to your older page will be broken because the permalink to your post will now be different.

This post was originally published in the wpbeginner glossary.

Additional Reading