Mizanur Rahaman Mizan / October 19, 2015
Permalinks and slugs in WordPress play a very important role in any blog, specially in WordPress because it provides flexibility to change permalinks and slugs. These are used for URL of posts, pages, tags, categories etc.
In Blogger.com you might be aware of permalinks structure but you can not change them or customize.
But WordPress provides that flexibility to modify according to our requirements. Permalinks is a pattern that we select for our blog posts and content’s URL. It is added at the end of blog domain name, where WordPress is installed.
For example “?p=id-number” is a permalink pattern and “yourdomain.com” is domain name. WordPress by default provides permalink in the following format “/?p=id-number“.
Note : id-numbers => id of posts and pages.
The end result is “http://yourdomain.com/?p=id-numbers”
You can also change this default structure with some other structure, like “/%postname%”, “/%year%month%postname%“, etc. You can find all the other structures of permalinks in Settings -> Permalinks option.
Slugs are used in permalinks structure. In the above example we are not using any slug. Confused? Let me explain. It is a simple id of posts and pages. WordPress by default creates slug for Posts, Pages, Categories and Tags as long as we have not created a specific Slug. Slugs are always created in small letters with “-” sign in between the words.
Example: your post name is -> “My First post In WordPress“ the slug of that post is “my-first-post-in-wordpress”.
Then this slug is used in permalink if you are using permalinks structure “/%postname%” then your post URL will be “http://yourdomain.com/my-first-post-in-wordpress” . This permalink pattern will be used for all the posts and pages.
We can also change slugs for Categories and Tags. WordPress by default provides slugs if we have not created it while adding Category or Tag. Method to change slug for Categories and Tags is quite similar.
Most of the time post name is too long. Here we can also change slug of post to make it short and hence make it useful for search engine to look up.
Example: Lets say the post title is “How to change the permalink structure of WordPress blog that will be useful for Search Engine”. This is a long post name, we can change its slug to – “change-permalink-structure-wordpress-blog-useful-search-engine”.
WordPress provides such a great feature to edit slugs for post, pages, category and tags. By that you can make post URL short. Permalinks structure is also helpful to readers to remember post.