We are currently in development on a new site. Categories (& tags) are pretty much meaningless for us because we've implemented custom posts & taxonomies.

By default, because I have enabled pretty permalinks, if I create a post titled, "Mubarak steps down" without selecting a category, Wordpress will give me this: domain.com/uncategorized/mubarak-steps-down.

Today, I installed the custom permalinks plugin which enables me to make the permalink virtually anything I want. I have a custom taxonomy called countries and one of the terms is Egypt so I re-wrote the above permalink to be domain.com/countries/egypt/mubarak-steps-down. domain.com/egypt/mubarak-steps-down would be better but there's nothing there & writing a re-direct for all countries would be a major pain.

The pros, as I see them, in doing this:

1) A reader may realize that by removing the post title and re-submitting the url in the browser that they will see more content on the parent subject most relevant to the individual post, in this case, Egypt. Of course, this can also be done by making a link to the Egypt section on the page easy to see.

2) I think* it could be an effective white hat SEO strategy for communicating something more relevant in the url than 'uncategorized' or something else generic like 'events' or 'news.'

What are the pros and cons of doing this with respect to WP database performance, etc.?

1 Answer 1


For the SEO part you might get better answers on the Pro Webmasters Stack Exchange. I will focus on the performance.

From your example I assume your permalink structure was %category%/%postname%/. Because of the way WordPress parses the incoming URL, this will result in verbose page rules, which means that each page (not post) you create gets their own set of rewrite rules. If you don't have many pages this does not matter much, if you have a lot of pages (say, above 50), this can be a serious performance hit or even stop your site from working.

You use the Custom Permalinks plugin, but a quick look at the code makes me doubt it will scale well when you have a lot of posts. I'm not a MySQL expert, but I think the database can't use an index effectively to speed up that query it does at every URL request.

If you want to use the same structure for every post (%custom-taxonomy%/%postname%/), I suggest you modify the rewrite rules to match this. I believe you can even do this by setting the permalink structure to %category%/%postname%/ and filtering the post_rewrite_rules by replacing category with your custom taxonomy slug.

But if you don't use categories, wouldn't it be easier to re-use this taxonomy so it fits your needs? You can change the labels of the default taxonomies so they look like your custom taxonomies. The benefit is that categories have very strong support everywhere in WordPress, while the custom taxonomies are still new and can't always do everything (as easy) as categories can.

  • P1: I have custom post types with 25,000 posts but only about 10 pages sitewide that are things like Privacy Policy, etc. so I guess I am in the clear? P2-P3: I think that's doable and it's fine if I have multiple custom taxonomies? P4: It's probably too late. The primary custom taxonomies already have 1,000 terms each and that will grow soon well into the thousands...
    – Adam
    Feb 13, 2011 at 22:32
  • @Adam: If you want multiple custom taxonomies with the same rewrite structure (%taxonomy%/%postname%), you will probably get a conflict because WP doesn't know which taxonomy you specify in the URL. But maybe we can write rules around that, so that only the post name is read... And changing a taxonomy is doable, if the "target" taxonomy is empty it only requires you to do a simple database update. Both are good independent questions, maybe you can ask them on this site again and we can expand there?
    – Jan Fabry
    Feb 14, 2011 at 6:53
  • Not sure if this is what you had in mind but I started a new question: wordpress.stackexchange.com/questions/9346/…
    – Adam
    Feb 15, 2011 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.