Speedy WordPress

I’ve been building WordPress sites for a long time – over 5 years, anyway. I’ve learned more and more about all the nifty ways to leverage what WordPress does well, and work around what it doesn’t do well. It has been a moving target… What’s recommended in 2007 is no longer true in 2011.

Also, since virtually all of my clients from back then are still clients, their sites have grown! Following my advice of posting twice per week would generate over 100 posts per year! Sites like NevadaCounty.com, which started out pretty big, now have enormous databases.

Time to speed things up: WP Super Cache is a plugin that basically takes unchanged posts out of the database and puts them in cached HTML, ready to serve much more quickly… no database query means lots of saved server processes, and a snappier response.

Also, the old advice of making URLs pretty by using /%category%/%postname%/ turns out to work the database pretty hard, too. Although the cache program reduces the number of trips to the database, it still would be nice if it were quicker… and recent details from the Google guys about search performance suggest that dropping the /%category%/ part will actually improve your search results on the basis that the shortest distance between the base url (like http://richoid.com) and the keyword-laden post name (like ‘/10-reasons-to-blog’) is the best policy from Google’s point of view. Even though the category is a generally going to be a significant keyword, I guess the extra ‘/’ tells Google it’s of lesser importance than the info after the final ‘/’… i.e. the postname.

So we now are dropping the /%category%/ from new blogs. If you want to remove them from old blogs, be sure to use a tool like ‘Redirect’, or .htaccess to be sure old links still find the same posts they always did. For a big site this is a nontrivial task!

Leave a Reply