You may have heard terms like post slug, permalink, and Pretty Permalink as you work on your WordPress site. To most people they can be very confusing. If we understand the concept of those things, they can be a very useful tool for sharing and keeping track of posts and pages.
This article will help you learn what in the world is a post slug and how to use it.
What is a Post Slug?
Here is how WordPress Codex defines it:
A few lowercase words separated by dashes, describing a post and usually derived from the post title to create a user-friendly (that is readable and without confusing characters) permalink. Post slug substitutes the “%posttitle%” placeholder in a custom permalink structure.
Post slug should not be changed and is especially useful if the post title tends to be long or changes frequently.
In WordPress the slug can be a post slug or a Page slug. With WordPress, they are all slugs.
Why Change the Post or Page Slug?
There are several reasons for changing the post and Page slugs in WordPress.
Someone might wish to change slugs is to help prevent mix ups in post titles and links, for example if you have similar post titles you can change the slug so readers don’t get confused.
It’s also useful to use slugs as a tool to bring people to your site. Changing the keywords in the slug that may not be used in the title that are search engine friendly and will make your post easily accessed by users.
How to Change the Post or Page Slug
The following are instructions on how to change the post slug in WordPress.
- In the permalink under the post title click the edit button or click on the slug field. It will activate the edit mode.
- Edit or type in the name that you would like to appear in your permalink. You can type in the name without the dashes because it will automatically be converted to the correct format.
- Click Okay and you’re done!
Note: Once a slug has been created changing the post title will not affect it.
Helpful Sources on WordPress Slugs
For more helpful information and to learn more about slugs and permalinks visit rtCamp’s article “Understanding Permalinks and Slugs in WordPress.” For more information in general, see the article on using permalinks on the WordPress Codex.