Migrating Your WordPress Permalinks

by Michael Scepaniak on August 26, 2010 in software development

When I first set-up my WordPress blog, I used the default permalink structure. For example:


I liked it because it kept the URL’s short. But, I came to understand the SEO benefits of readable URL’s. And the default structure made interpreting my Google Analytics reports a chore. So, I decided to change the structure to one that just used the name of the post:


And this works fine. You go into your Permalink Settings screen, specify the Custom Structure, save the .htaccess file, and the above URL changes:


But, I could still access the old URL directly. This wasn’t cool to me, because the search engines would still drive visitors to the old link structure, Google Analytics would still show the obtuse links, and my URL’s would remain search-engine hostile. What I wanted to do was migrate the old URL’s to the new URL’s. It turns out that there are lots of WordPress plugins offering to do this for you. After much investigation and reading, the one I finally settled on was the Permalink Redirect WordPress Plugin by Scott Yang. Why? Primarily because of this thorough blog post about the Permalink Redirect Plugin by Michael Bubbo.

I followed the instructions and everything worked as expected. And when I look in my Apache access logs, I see the 301 redirect goodness that I expected:

12.345.678.999 - - [26/Aug/2010:02:37:58 -0500] "GET /blogs/tech_blog/?p=76 HTTP/1.1" 301 4224 "-"
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20100722 Firefox/3.6.8"
12.345.678.999 - - [26/Aug/2010:02:37:58 -0500] "GET /blogs/tech_blog/migrating-your-wordpress-permalinks HTTP/1.1" 200 3798 "-"
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20100722 Firefox/3.6.8"

I hope this helps.

Want to be notified when new articles are posted?
Enter your email address:

{ 2 comments… read them below or add one }

Jonathan Julian August 26, 2010 at 7:18 pm

Great advice – you want those old url’s to 301 redirect. If you’re ever in a situation where two urls are pointing at the same content, and you CAN’T 301 redirect one of them, you can always use the link rel=”canonical” tag to tell the search engines to consolidate access through the single url.


Michael Scepaniak August 26, 2010 at 7:26 pm

Yeah, that sounds familiar. I’ve never had reason to use it, though. Thanks, Julian!


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed

Previous post:

Next post:

Member of The Internet Defense League