With working in the web hosting industry I get a lot of questions on how to minimize load and prevent comment spam. I thought that I would do a quick little write-up of what I have found to be the best ways to head off these issues, many of which I use here myself.
First off you want to make sure that you are running the latest and greatest version of WordPress(At the time of this writing the newest version was 2.1.3). WordPress 2.1.3 has many fixes in it and a lot of code rewrites which not only improve loading time but also cut down on a lot of the queries that are not needed for certain functions. And as usual, the upgrade from the older version to the new one takes only a few minutes thanks to the great upgrade script that is included with the installation.
Minimal Theme: We all love to have a theme with a ton of bells and whistles to it, but all those extra images and tables can cause a lot higher load on Apache than something that is very trimmed down.
Fewer Plugins: Same goes here, it is always nice to have a tag cloud, stats, and handfuls of trackers. The more of these that you remove the fewer queries that WordPress has to make to the database, this can speed up things a log.
Here are the plugins and hacks that I have found to not only prevent spam but give you an upper hand when combating spam on your blog.
Akismet – This is by far the best plugin to have enabled on the front line. Not only does it do a great job at catching spam, but it is written by the same folks that created WordPress so it ties in very well… oh yeah did I mention that the service is free. Note: If you are not running WordPress you can still make use of this plugin with other Content Management/Blog software.
WP-Cache plugin – This plugin alone has been shown to drop server loads from a WordPress site anywhere from 50-80%. The installation for this plugin is very straightforward forward and you can have it up and running in a matter of minutes. The newer version of the plugin also has some bug fixes with the built-in WordPress Cache. Within the settings of WP-Cache, you can change the “expire time” from 3600 seconds to 600 seconds, this should help you out in case you ever make the front page on Slashdot or Digg.
http:BL – This is a pretty new plugin that makes use of Project Honey Pot. This plugin verifies the IP addresses of clients connecting to your blog against the Project Honey Pot database. You just need to enable it and then head over to ProjectHoneyPot.org and get a free account.
Post Query Accelerator – Changes the way that a variable is looked at in WordPress so some queries are cached.
Bad Behavior 2 – I have actually yet to install this, mainly because of a lack of time as there are some extra tweaks that you need to do to get this working effectively with WP-Cache. I have done some reading and this looks to be much better over Spam Karma 2, not to mention they are looking at enabling http:BL in the next version which will do away with yet another plugin.
Now if you have a Virtual Dedicated or fully Dedicated server you can do even more to the system, and some hosting providers might even do these types of changes on a Shared platform as well.
eAccelerator – This is a great add-on for any system. It caches parts of scripts so that PHP does not have to run the file again, cutting down on CPU usage. In most cases, the default settings for this after installation should do you well. You can check out my article on how to install it.
Lighttpd – I am still using Apache since I am on a CPanel system, and well Apache works just fine with it. But if you want to take on the task you should look into Lighttpd. Lighttpd is a lightweight web server that is getting a lot of attention since it has a small footprint and still supports many of the same add-ons as Apache.
Stay tuned for more tweaks coming soon.