(+84) 463.28.7979

Customize & Change Permalinks in WordPress


If you are a new starter with WordPress, you have the ability to fix the permalink structure of your urls as per your choice. Once your links are linked back by thousands of websites and indexed by search engines, it is difficult to change your permalink structure as it will lead to all broken 404 links.

WordPress provides a very user frinedly way to customize your permalinks easily. Just in case you did not know, permalinks means the permanent url of your post. WordPress codex has an excellent article on Using Permalinks.

You can change your entire blog permalink structure with one click only. It is a powerful tool, use it carefully. After you login to WordPress, go to Options, then Permalinks. There you can choose

Default

http://www.sitename.com/?p=123

Date and name based

http://www.sitename.com/2006/03/18/sample-post/

Numeric

http://www.sitename.com/archives/123

And the powerful way is to customise it as per your liking too. What I am using is
/%year%/%monthnum%/%postname%/
I removed the day part of the code in my custom permalink, more in line with what Blogger does. You can also include hours, minutes and seconds into your post url. Amazing!

I was tempted to remove the date part all together and just add postname, such that I could have neat urls like http://www.sitename.com/postname but they warn that

If you use postname as the only element in your permalinks to create a structure such as myblog.com/post-title, the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder. It’s best to include some numeric data (e.g. the post ID or date) in the permalink to prevent this from happening.

On the codex page I pointed above, you can try many more advanced permalink tricks with .htaccess, mode_rewrite etc., but be very careful with what you do. This is a powerful tool and can change the entire url struture with one click only. So it is a good idea to fix your permalink strucutre when you start with WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>