b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Business Channel

Work Boxers

WordPress and Permalinks

by Paul on December 7th, 2005

Many of the people I see using WordPress for their blogging engine tend to create permalinks with the date being used. I don’t like this at all because what if I want to change something in the post or update it and push it back to the frontpage? To do this I have to change the date on it and doing so changes the permalink. Now obviously not too many of you go back to make changes on entries just so they can reappear on the frontpage, but if you ever do think this will happen I advise you use this structure for your permalinks:


/%category%/%postname%/

That will create a permalink with the category and entry title (might also be good for SEO if you think one directory deep is better than three) so if you make changes and push something back to the frontpage nothing will change. What happens if you create another entry with the exact same title and put it in the same category? WordPress is smart enough to recognize that and will automatically affix a number to the entry title keeping all permalinks intact.

The reason I wrote this post is because I saw this occur over at Darren’s site. He recently republished How Bloggers Make Money from Blogs with some changes to reflect his new knowledge. However, if you notice the url has changed the date to 12/06 and I wondered what happened to the old permalink. Well see for yourself.

That’s not a good thing because now all the permalinks pointing to the original entry are broken along with all the search results that take days/weeks/months to build up. Darren would’ve been better off linking to the old entry and simply making a Part II to accompany it. Hopefully this doesn’t happen again because I know the time and energy it takes in writing a quality entry that people will link to only to wipe that hard work away because you weren’t aware of what was happening with your blogging engine.

POSTED IN: Web Tips

16 opinions for WordPress and Permalinks

  • Jamsi
    Dec 7, 2005 at 1:48 am

    Very nice tip indeed, one everyone should obey or at LEAST keep in mind when editing posts like Darren did.

    Nasty stuff Darren, hope you can fix it :)

  • actionBERG
    Dec 7, 2005 at 1:52 am

    Good point. It also throws in another keyword into the URL.

    The only thing I don’t like is that it doesn’t let you have a recurring post title. Like if every week you do a post titled “Weekend Summary” or something. To me it just doesn’t look right adding the date. But I guess you can just add more to the title to make it unique. Any suggestions on that scenario?

  • Scrivs
    Dec 7, 2005 at 1:59 am

    WordPress is smart enough to recognize that and will automatically affix a number to the entry title keeping all permalinks intact.

    WordPress would simply label the next one weekend-summary-1 and so on.

    Also I sent this code to Darren, but figured everyone might want to know it. Doing this off the top of my head so I might be a bit off:

    Redirect permanent /archives/2005/10/25/how-bloggers-make-money-from-blogs/ /archives/2005/12/06/how-bloggers-make-money-from-blogs/

    Put that in the .htaccess and that will at least fix the one entry. I can’t speak for the others if this has been done before.

  • Scrivs
    Dec 7, 2005 at 2:00 am

    Man that messed up the spacing, oh well.

  • Yzabel
    Dec 7, 2005 at 3:48 am

    That’s what I’ve been doing on all my blogs, for exactly the same reason you’ve listed in this post. I even went around using an /archives/%postname% structure, in case I’d decide to change the category for a post later on. Besides, I find it more “pleasant” to the eye than, say, a 2005/12/01/%postname% permalink. (I may miss the extra keyword in the URL this way, though, but since I try to make my titles “appropriate” and not some esoteric, witty thing, I guess it’s not too bad.)

  • Kyle
    Dec 7, 2005 at 3:50 am

    At my last redesign of Warpspire I took this into account in a major way (Actually URI design was one of my major redesign initiatives).

    I wouldn’t have it any other way. This makes a blog feel a lot more like a website than a blog if that makes any sense.

  • JBagley
    Dec 7, 2005 at 4:01 am

    Its always intersting to find out how people archive their wordpress posts.

    If you going to be posting a “weekend summary”, as actionBERG talks about, making the post title something like “weekend #34 summary” or append the date somewhere in the title will make it easier for people who scratch around your archives to find where they are!

  • HART (1-800-HART)
    Dec 7, 2005 at 5:22 am

    I use the pattern /%year%/%monthnum%/%postname%/ in all my blogs .. I personally prefer to see the year and month in the URL. But it is a good tip. Would you recommend restructuring existing blogs with this new permalink structure? or, just for starting new ones?

  • Lyndoman
    Dec 7, 2005 at 5:40 am

    Totally agree, and something that had had to figure out myself. Where was this post when I needed it? lol. It’s all about messing about with the variables, find out what works and then just keep doing it. Now every blog I start has the same system and even template. Problem is, if you are building a network of blogs and you find out something really cool like the auto feed generator, you then have to go back to all your blogs and redo them.

    It feels I spend too much time on the design and functionality of the blog than on the posts. Readers want posts, they crave information, they are junkies for the text and we need to feed their habit.

    Sorry, got carried away on a drug metaphor and the only drug I do is caffeine.

    One more thing Scivs, I just love your design, it’s my personal favourite. Less is more!

  • Darren
    Dec 7, 2005 at 5:49 am

    thanks scrivs - had a few people tell me about this but it’s been one of those weeks so it took me a while to fix it. Thanks for tip though.

  • Andre Roodt
    Dec 7, 2005 at 8:26 am

    Thanks for this tip. Its something i’ve thought about, but obviously would only attempt this with a new blog. By changing it later in the game you are changing the link of every page indexed by the search engines up to that point.

  • Tony Summerville
    Dec 7, 2005 at 11:35 am

    Lots of people also will use categories as part of their permalink, however if you’re like me and ever edit your category names, or change a post’s category, the permalink will change. Now I just use the year and the id of the post.

  • Jennifer Grucza
    Dec 7, 2005 at 12:29 pm

    Other people have mentioned changing the categories would cause the same problem, but I’m curious what happens when you have multiple categories for a post…

  • Scrivs
    Dec 7, 2005 at 12:34 pm

    It uses the first category for that entry. If you are worried about changing categories I suggest doing what Yzabel said and simply doin /archive/entry-title

  • BlogBoy
    Dec 16, 2005 at 3:26 pm

    Very interesting… let me use my Southamerican ingenuity here… why isn’t anybody using /postname/ FIRST and THEN some form of date, which could be 20051216 (year, month, day all together) to keep it short & sweet. Because from what I understand, the point is not to eliminate the dates, but rather to bring the Post Tile Kewords closer to the site’s name… so simply do so, and then place the date or category name AFTER that.

    Is this possible at all? Sounds like a good idea to me, but then again, I’m not a programmer, only some guy from the land of ‘magic reality’

  • Adam Messinger
    Dec 19, 2005 at 2:35 am

    Mr. Summerville beat me to it, but my reason for switching from category names in the URI to date-based addresses is the same as his. I just got sick of editing my .htaccess file. I’d also accumulated way to many categories, and had just moved to a CMS (WordPress) that made category changes and nested categories easy. The URI change was done as part of the big category cleanup.

Have an opinion? Leave a comment: