I’m Ditching Post IDs In WordPress Permalinks
You probably know that you can change the URL of your WordPress posts by using a custom permalink structure. I've always done that, primarily for search engine benefit, and until just recently I've been using a custom permalink structure of;
/%category%/%postname%-%post_id%/
This was all well and good, until I needed to move one of my blogs. I couldn't do a database move and had to export and then import the blog content. That's when it all started to get messy. When I imported the posts into the new blog, all the post IDs changed.
You'd sort of expect that really, but what I never thought about was that it also meant all the post permalinks changed too, because the post ID formed part of the URL. Ummm.. bad. Permalinks are supposed to be permanent.
So then what I had to do was start creating permalink redirects ..etc to make sure that people following the old links found the new posts, and this created a lot of what I'd consider unnecessary work – which is something I am allergic to.
The WordPress documentation recommends using a number as part of your permalink structure, primarily to avoid confusion with existing files such as stylesheets ..etc so that's what I did. I did read somewhere that using the post ID can decrease server load, but I couldn't find that article again and I haven't heard anything about it since. Please let me know if you have any experience of that.
After a bit of a rethink about the problem caused by using post IDs in the permalink structure, I considered the available alternatives. Maybe I could use the minute from the post date? I'm guessing that would be imported successfully, so my post URLs would stay the same if I ever needed to move a blog again.
But then I thought, just how likely is it that any of my post URLs will clash with any existing URLs, if I just use the category and post name? I think it's extremely unlikely.
So, in the absence of any real evidence that not using post IDs increases server load, and on the assumption that I'm unlikely to have URL conflicts, I've decided to use the following permalink structure;
/%postname%/
and if I ever need to move a blog again, I predict life will be very much easier.
del.icio.us
Digg
Propeller
StumbleUpon
Reddit
Furl

Hi there. My name is Peter Coughlin. I am a freelance web developer living in the UK, and at the moment I am specialising in WordPress customisation.
0 Responses so far ↓
Tell me what you think...
Note: your comments may need to be approved before they are shown.