Mark on WordPress

Change Your WordPress Post Slugs

Posted in wordpress by Mark Jaquith on November 3rd, 2005

If you’ve been using WordPress with “fancy permalinks” (/year/month/day/post-slug/) you’ve probably experienced the following problem with your post slugs (the part of the URI that is an all-lowercase dashed version of your entry’s title, like this-is-a-post-slug):

  • Write a post
  • Two days later, realize that you misspelled the title
  • Fix the title
  • Realize that the post slug is still misspelled
  • Change the post slug
  • Get e-mails from people saying the old link is broken
  • Curse loudly
  • Change the post slug back
  • Lose sleep, thinking about that misspelled post slug
  • Get e-mails from people saying the new link you temporarily created is broken
  • Curse loudly

Well, maybe not that bad, but you know what I’m talking about. There are ways around this, like by manually creating an Apache redirect for the old URI to the new URI. Ugh… holy annoying.

So now, I present to you a solution. Go install the Redirect Old Slugs plugin that I wrote. Now, you can change your slugs at will, with no broken permalinks! The plugin notices when you change the slug of a published post, and it remembers the old slug for you. Now, when someone goes to the old slug, they silently get redirected to the new slug. Even Google will find your new post. What’s more, it works with WordPress Pages too, and you can change the slug multiple times and the plugin will keep track of each of the “abandoned” slugs!

Install it and forget about it. It just works.

Works for WP 1.5.2 as well as WP 1.6 (as of this publish date).

14 Responses to 'Change Your WordPress Post Slugs'

Subscribe to comments with RSS or TrackBack to 'Change Your WordPress Post Slugs'.

  1. Handry said, on November 19th, 2005 at 3:48 pm

    Thanks for this info,
    I have this problem before.

  2. Jonathan said, on November 23rd, 2005 at 12:56 am

    Nice Mark! That’s a great idea and I’m glad someone finally created it.

  3. EugĂȘ said, on December 17th, 2005 at 3:32 pm

    Hello Mark!
    Great idea, many thanks for that!
    Saves a lot of time. :-)

    EugĂȘ!

  4. Bot said, on December 17th, 2006 at 8:52 pm

    Dear webmaster! Your resource is in our spam list.Please email me to astopae@yahoo.com and I remove Your resource from spambase.http://groups-beta.google.com/group/abdus/files

  5. KILLERrxmie said, on December 19th, 2006 at 10:22 am

    yes baby i wanna sex

  6. James said, on December 21st, 2006 at 4:51 pm

    Dear Webmaster! Your resource is in our spam list.Please email to astopae@yahoo.com Your site link and we remove Your resource from spambase.Othervise Your site hase been spammed every 15 minutes.Thank You for cooperations.

  7. gices said, on December 29th, 2006 at 9:19 am

    Awesome tool. Just what i needed. Thanks!

  8. [...] still manages to have crappy looking URLs even though they seemed to have added in book “slugs.” Blogging software, so far, has been the most consistent in it’s success of making [...]

  9. matanet said, on June 11th, 2007 at 3:11 pm

    Hello ,your site is the best one! Thank you

  10. Lisabetta said, on July 2nd, 2007 at 3:51 am

    Beat a hasty retreatg

  11. Online Roulette Gambling said, on April 9th, 2008 at 2:05 pm

    [a] http://online-roulette-gambling.com/ [/a]

    “Best Roulette Strategy.u

  12. Olecyavey said, on April 15th, 2008 at 5:55 am

    Dearest Milton,Thank you for all of your time and attention to detail in helping us design
    our wedding bands. We love them! http://werwervia.zip.io

  13. Sandi Kane said, on April 18th, 2008 at 11:49 am

    alesan shooi acquisitiveness councilist recoct lax monomyarian characterizable
    First National Equity, Inc.
    http://www.angelfire.com/pop/vanessa/

  14. how do i know if i need flood insurance said, on April 24th, 2008 at 11:05 am

    how do i know if i need flood insurance…

    ingredients:reconciling Frigga sunset slob …

Leave a Reply