Customize & Change Permalinks in WordPress

By Posted 2006 Updated   BloggingWordPress

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.


10 comments on “Customize & Change Permalinks in WordPress

  1. Jeremy says:

    What about the links within individual legacy posts? Are they changed as well? I reference other posts from within by posts a lot, and the permanlink structure is part of the content. Do I still have to manually adjust that, post by post?

  2. Ed says:

    Great info, i got in my blog the date and info permalink.

  3. Lucas says:

    Hello,

    I am getting an error that is simply confusing me a little bit…

    Not Found
    The requested URL /our-standards/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Any ideas where i am going wrong with this? Talk soon

    Luc

  4. louie says:

    I am having problems with my comments after changing the permalink structure. Do you have any idea how to fix this?

  5. Johnny says:

    I have a nice and structured category list, with a lot of subcategories.

    Example:
    – Main news
    – – Sports
    – – – Football
    – – – Baseball
    – – – Curling
    – – National news
    – – – politics
    – – – health
    – – – environment

    In the past these category slugs have been part of the permalink structure, eg: main-news/sports/football/postname
    But after upgrading to 2.6 this seems not to be the case anymore, result: main-news/postname. It’s missing all the subcategories.
    Unfortunately I HAVE to maintain this structure in the front-end of the site, due to indexed search results, bookmarks etc. Besides that, i believe it looks nice, logical and professional.

    In the permalink settings I’m having the same settings as allways: Custom Structure: /%category%/%postname%/ which worked fine, until now.

    Does anyone had the same problem, and a solution to this annoying problem ??

  6. How can I change back to default one says:

    I did this change, but I cannot change it back to default, I always got “404 Not Found “, any idea how to resolve this issue?

  7. Prathamesh, says:

    Hey, i have the sidebar menu tabs to my wordpress theam
    here they are looks like

    -About us

    -Projects
    -proj1
    -proj2 This area shows post
    -proj3

    -Contact us
    -News

    when i click to the about us and contact us page, it redirected to wrong page all the post are shown to right part as shown above ? i have checked the permalink which is set to custome structure as /%year%/%monthnum%/%postname%/ and also when i post the pages from page tab of wordpress admin and publish preview it, again it shows wrong page ? can anyone help me about this

  8. Abhijit V. Chaore says:

    Permalinks indeed can make or break the structure of your site/blog. Its better to set up the permalinks in the begining only.

  9. Sub Elahi says:

    Thanks for sharing this info :)

  10. JuJu Aquamoist says:

    Thank you SOOOOO much. I was having so much trouble trying to find out what I did wrong. I went into the permalink thing on edit page and all the pages on my site went 404 on me. I got so worried. Thank you again!!! it’s all fix now :)

Leave a Reply

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




css.php