Speeding up Wordpress with WP Super Cache
A Really Fast Wheelie by DavidHT
Your moment of fame has arrived and with it the unwashed masses of the Internet flock to your site to gawk at your latest insights. As you have bought the promotion priced hosting with its retirement age web server it dies a horrible dead just seconds into the rush.
No budget priced hosting account will survive such an onslaught but there are many things that you can do to improve your visitors experience. Even when its not busy.
When a visitor looks at your blog Wordpress will go through a long start-up sequence and ramble through the database a couple of times. It needs to locate its plug-ins and allow each of them to add content. Despite all of that it can usually do this in a fraction of a second.
This is great if its a lone visitor looking at your blog but now imagine a hundred visitors doing that in the same second, or a thousand, or thousands. The web server quickly runs out of time and can no longer serve any pages.
The key is of course that 99% of the time Wordpress is going through exactly the same steps. If a user is not logged in your blog will look exactly the same to each visitor.
This is where a cache will help as it will store earlier generated pages and just keeps on resending them. Your web server can now send the same page hundreds of times faster. This is the approach taken by WP-Cache, the most popular way to speed up a blog.
But can we go even faster?
The quickest a web server can serve a page is if the page is loaded from disk and send directly to the visitor. It can take the file and send it on without needing to look at the contents.
For WP-Cache to run the web server still needs to load PHP. This is a massive interpreted language module that needs to initialize itself before giving control to Wordpress.
A fork of the WP-Cache project is WP Super Cache. It wraps around the WP-Cache and extends it. With some Apache configuration magic your webserver is now able to send plain text files directly from disk without ever having to load PHP.
Even better — it is also possible to pre-compress the files. So your visitors receive GZIP compressed web pages , cutting down on your bandwidth usage, while saving your webserver the work of having to compress the information in real-time.
Now you just have to find fame & fortune, you are all set for it.

One Response to “Speeding up Wordpress with WP Super Cache”
Trackbacks/Pingbacks
Leave a Reply