Quick Tip: Permalink Structure

One of the great things about WordPress is the ease with which you can create pretty, semantic URLs. But did you know that some permalink structures can potentially negatively affect your site’s performance?

In his 2009 article on optimizing permalinks, Dougal Campbell wrote about this issue, saying:

If there isn’t some way to narrow down the information in the URL and map it to a specific page or post, the system must perform a lot of database searches to find the correct entry.

His article went on to cite examples of permalink structures which required extra database searches…which included our standby of /%category%/%postname%/. Apparently, since %category% outputs a text field, it takes more time for WordPress to distinguish your post from a page – which requires WordPress to store extra information in its database to compensate.

Indeed, the Using Permalinks page in the WordPress Codex has been updated to include this information:

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields.

We’re using /%year%/%postname%/ as our default from here on out – how about you?

Comments are closed.