Why You Should Use WP-Super-Cache

Posted By: Tony Baird

Last Updated: Sunday September 13, 2009

At Hawk Host we deal with CPU usage issues with accounts like every other host out there.  I’ve noticed an ever growing pattern of the problems always coming from Wordpress blogs and almost always they have no caching what so ever.  When a web page is served without any caching in wordpress it will load up PHP then grab the data via MySQL.  These are both the slowest and most intensive portions of a web page.  The images, css files ect. are all served nearly instantly by the web server and it can serve a lot more of these static files per second then PHP pages.

This is where WP-Super-Cache comes into play what it does is when pages are served the first time it checks the caches and if they do not exist it then creates the cached file and serves it.  It has two options using rewrite rules to send users to .html versions if they’re available or to have PHP still handle it but load the PHP files instead.  How the HTML version works is the rewrite rules it inserts into the .htaccess file checks for file existence in the cache folder and if it’s there that’s where the file is served out of.  This is the ideal situation as no PHP being loaded at all means a server can handle a lot of traffic meaning even being on the frontpage of digg may very well be handled fairly easily.  There are some cases where users forget this portion so we always make sure to remind users to get the rewrite rules in.  In a lot of cases their blog goes from using a lot of resources under traffic to being a user we have no idea we’re even hosting.

So how do you know if the cache is working?  Well on each page if you view the HTML source you’ll see something like this:

You should also make sure the cache page generated time has not changed on a refresh of the page seconds later (tells you it’s broken).  So if I refresh the page again and I have made no changes to the blog I should see this again:

This tells me the cache is working and the page was served via a html file.

I hope this convinces everyone who is not running WP-Super-Cache to install it now and configure it!  Especially if you’re hosting with us because eventually if your site becomes popular I’m sure you’ll hear from us about installing it to reduce your usage so that your site can scale up much better.

I plan on posting some more Wordpress related posts in the next few weeks regarding things I’ve noticed on blogs that decrease performance and increase resource usage.  Hopefully the tips help users who think they might not belong in a shared hosting environment to think otherwise after correcting these issues.

Ready to get started? Build your site from