A slug is a few words that describe a post or a page. Slugs are URL friendly version of the post title (which has been automatically generated by WordPress), but a slug can be anything you like. Slugs are meant to be used with permalinks as they help describe what the content at the URL is.
A permalink is a URL at which a resource or article will be permanently stored. Many pages driven by Content Management systems contain excerpts of content which is frequently rotated, making linking to bits of information within them a game of chance. Permalinks allow users to bookmark full articles at a URL they know will never change, and will always present the same content.
About The Word
In WordPress the slug is the specific address of a post or Page after the domain name. By default, it is a number, the post or Page ID number. Through the use of pretty permalinks, WordPress generates a semantic structure for the slug, which by default is the year, month, date, and post title in readable numbers and words. This may be modified on self-hosted WordPress sites.
Example post permalink:
The slug for that post is “
In general, most people have no need to modify the slug of a WordPress post or Page. WordPress generates it automatically when creating a post or Page, cleaning it up to remove extraneous code and adding hyphens between the words. The main reasons people edit the slug is to shorten the length of the URL if the title is long, and to put more emphasis on SEO keywords.
For More Information
- WordPress Codex Glossary – Post Slug
- WordPress Codex Glossary – Slug
- WordPress Codex Permalinks
- A Straight Forward Guide to WordPress Slugs – Elegant Themes
- Understanding Permalinks and Slugs in WordPress | Blogger to WordPress User Guide
- Optimize Your WordPress Blog Post’s Slugs for Better SEO – John Saddington
- What is a “Slug” in WordPress? + Tips for a Great Post URL – Nose Graze