Avoid 404 errors when changing Wordpress permalinks

I recently changed my permalinks structure so that the urls are a bit shorter and I must admit, it seemed like a lot of other blogs were doing it, so I followed suit. The problem is though that any links to the old posts are met with a 404 error page. Now there’s not many external links to my posts (not yet anyway.. hehe) but this even affects the search engines cache of my urls.

So people looking for my Fisherman & Businessman story would sometimes come through to

http://www.brilliances.com/2006/07/24/fisherman-vs-businessman-story/

but I need them to go to the new permalink without the date in the url

http://www.brilliances.com/fisherman-vs-businessman-story/

I firstly tried stuffing around with the good’ol htaccess mod_rewrite. I thought something like this would work

RewriteRule ^[0-9]+/[0-9]+/[0-9]+/(.*)$ $1 [R=301,L]

Unfortunately, when nestled with wordpress entries in the htaccess, it kills the whole site. So off I went looking for a wordpress plugin that achieves the same thing. That’s the best thing about this wordpress blogging cms - it’s so popular, there’s tons of free plugins to do just about anything.

Enter Dean Lee’s Permalinks Migration plugin. All you have to do is upload the php file, activate the plugin, and then specify what your old permalinks looked like. In my case, this was

/%year%/%monthnum%/%day%/%postname%/

It works like a charm. I’ve even used it to fix my ever so popular post at jyse.com about fixing netgear’s wg311 connection problems. It was so popular it even features on whirlpool but they used the old permalink. Visitors would come to jyse.com and be greated with a 404. Guessing from my awestat logs, it seems their next step was to google “www.jyse.com wg311v3 fix” . Problem solved. Thanks Dean Lee :)

Popularity: 10%

Related Posts

  • Wordpress Mu 1.3.3 released
  • Moving wordpress from sub-domain to root directory
  • Multisite Manager with Wordpress MU
  • Automatic Wordpress Upgrade Plugin
  • New Wordpress Theme: Cutlines
  •  

    Keyword Elite Keyword Elite


    4 comments ↓

    #1 lynneth on 08.02.07 at 8:27 pm

    its not working. i tried it and it only gave me the permalink.migration where you put the structure but theres no option for the new structure to be input in.

    #2 Jerry on 08.02.07 at 11:02 pm

    Lynneth, it should automatically detect your new structure.

    #3 Flavio Copes on 08.30.07 at 8:00 am

    Hi, i’m going to make this change as i previously set my permalinks to year/month/day/post… now i’m going to have just category/post, hope this works without charm :-)

    #4 Yousef on 06.27.08 at 9:41 am

    thanks.

    Leave a Comment

  • Most Popular Posts