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.?
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 thepost_rewrite_rules
by replacingcategory
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.