Ever wanted to change your WordPress permalink structure but were afraid of 404 errors and SEO problems? I have a WordPress Hack to fix all your problems right here!
This is installment #12 of 30 WordPress Hacks in 30 Days!
This WordPress hack is one that I planned on writing write after the last one about rotating and recycling posts out of your archives and on to your home page. Mainly because there is one thing I didn’t address before, and that’s you permalink structure. In WordPress your “permalink” structure is your URL. By traditional default WordPress blogs have a day, month, year structure to the URL like this:
In your WordPress dashboard in either settings (WP 2.5) or options (before WP 2.5) -> “Permalinks” you have the ability to change the structure to whatever you want. In the beginning (because they don’t know any better) most people don’t and leave the date default. Even Matt Cutts says don’t use post dates in URL’s. Why not?
Wordpress Hack #10 should have been a prime example – if you’re going to be recycling your old posts to the home page, it’s going to change the published date to the current day – right? Well, it won’t change the permalink (URL) – and it will still reflect the old date. You could change the permalink structure manually in your dashboard, but that would just create new URL’s for every single post (removing the date portion), so every single bookmark and every single search engine listing you ever had will now be an “Error 404″ page. Ouch!
Over time if you write new posts every day or every week you probably aren’t going to want the post dates to matter as much, since new readers will be coming on board all the time. In addition – maybe you’ll want to move out of WordPress to another blogging platform someday that doesn’t have a date based post convention. If you’re in the same boat I was, you are now in quite the predicament – what to do, what to do?? Once again, enter a lifesaver WordPress plugin “Dean’s Permalink Migration!” It’s very simple to use, and will solve all your permalink problems.
First install and enable the plugin. Then in options or settings -> “PermalinksMigration” in your WordPress dashboard you’ll see a simple text field for only one option:
All you have to do is enter your OLD permalinks structure in that field. For most of you that’s going to be:
What I did was open up two tabs in my browser, both with my WP dashboard open. In one tab I had settings -> Permalinks and the other settings -> “PermalinksMigration”. I just copied and pasted my “permalinks” structure to “permalinksMigration”. Then in “permalinks” I changed the structure from this:
Then I click “update” to save each tab, one immediately after the other. To recap- what I’ve done here is removed the dates from my permalink (URL) structure, and the “Dean’s Permalink Migration” knows what my “old” structure was, and it will automatically redirect each and every page using old date based structure to the new page. You won’t lose any hits from bookmarks or search engines at all, and all of your URL’s will be much cleaner and shorter from now on.
The ONLY drawback I could think of was, this plugin only works ONE TIME. Since it only has one field for previous permalink structure to redirect – it can only redirect the last change you made. Hint to the plugin auther, you could hack this plugin to allow for multiple changes, and adding the ability to do the same for category permalinks would be a boon too!
Now I can just hear somebody screaming from the back of the room “what about my pagerank, what about my pagerank!”. In effect, to search engines, indexers, and crawlers this should be the same as a 301 permanent redirect. If you had pagerank assigned to any of your individual posts, it should transfer to the new URL over time – typically from a few weeks to a few months depending on google’s update schedule. I personally really don’t worry about pagerank anymore at all – you probably shouldn’t either.
I hope that this hack helped you as much as it helped me once found it. If you have any comments to make this post better, or question – please comment now!