WordPress and Caching

I just installed the plugin wp-cache. I’m not sure why more WordPress users don’t enable this. From the Wp-Cache description:

WP-Cache is an extremely efficient WordPress page caching system to make you site much faster and responsive. It works by caching Worpress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and the building the page from the database. WP-Cache allows to serve hundred of times more pages per second, and to reduce the response time from several tenths of seconds to less than a millisecond.

I don’t know how many times I’ve gone to a link on Digg.com and found an unusable site with mysql database connect errors, or simply a crashed web server. The comments always say “Another WordPress Blog”.

The problem isn’t WordPress specifically. Any site with a database backend for storage could have the same issues. The problem is that WordPress doesn’t cache pages by default. Any site serving static content with Apache as a front end should be able to handle digg traffic for a while assuming that they enough memory, bandwidth, and the apache directive “MaxClients” set high enough. Well, WP-Cache turns your dynamic WordPress installation into static pages and only regenerates them when they change.

We were marveling at the efficiency of this all when Scott’s Site was dugg twice on the same day.

Categories vs Tags

I found a couple plugins that make the tag and category features function the way I’d like.

  • Simple Tagging
    This plugin allows each post to have an associated set of tags. This enables a clean category system while still being able to show the subjects that each post talks about.
  • Simple Tagging Widget
    This widget Enables a cloud view of the tags in the sidebar.

Choosing a bookmarking plugin

Well, after evaluating a lot of templates, I’ve realized I’ll need a bookmarking plugin. There aren’t very many templates that contain the bookmarking widgets already.

Here are the ones I’ve tried:

  • Social Bookmark Plugin
    This one is OK. I like how you can dynamically choose which sites you’d like included in the list of links. It doesn’t have any graphics though and I like that.
  • Social Bookmarking
    This one caused a fatal error when I tried to activate it. I don’t feel like finding out why.
  • ObSocialBookmarker
    Ok, this one seems to do the trick.

Permalinks

I’ve played around quite a bit with link structure for various sites I’ve programmed. I’ve found that Google will index your pages whether they have a parameterized URLs:
http://somesite.example?param1=this¶m2=that
or parameterized Paths (Permalinks):
http://somesite.example/this/that
I think, however, that in general, search engines like the path portion of the URL better than they like than the query string for indexing search terms. In addition, it makes the URLs easier to read and understand what the page is about.

Hint, for WordPress, you can change the link structure of your site on the options tab. If you change the permissions of the .htaccess file in the WordPress installation, it will even write that file for you. For me, WordPress is running under the apache user account.

>chgrp apache .htaccess
>chmod g+w .htaccess
>ls -la .htaccess
-rw-rw-r-- 1 root apache 204 Oct 1 09:12 .htaccess