Install and configure Varnish (3.0.1) cache with WordPress


A few days ago I promised I’d go through what  I did when setting up varnish with wordpress, its been slightly delay  but here goes. The blog I used it on was Script and Scroll. I’ve ran the Apache benchmark tool against the site, only one URL but made 1Million requests to it and it held up quite well. The requests were completed in about 5 minutes, I may post the results in a later entry…

So, on the day that alarm bells went off form traffic spike, I just install varnish and cached everything and anything that I could… Obviously this isn’t ideal in most cases but I had very little time to spend on this. So method one below is the “naive” approach I’d say, but it works and works fairly well. Method two is my current configuration which is based on a post Donncha O Caoim did. I had to tweak a few things because I am using the latest version of varnish some of the configuration options he used changed in version 3 of varnish.

Read more of this post

WordPress + Varnish Cache, A match made in heaven


Recently my other blog, Script and Scroll, started to get a decent amount of traffic. One blog in particular linked back to a post someone published and it gained a lot of attention. Within a few hours of the link being created I started to get alerts from my monitoring system…Wordpress was slowing down, crapping out and running out of memory when serving pages. The load on my VPS hit the roof and Apache more or less came to a halt. After a quick round of investigating, scanning logs etc, I realized what was happening after seeing the referrer and looking at the page that had linked to us. Right, it was time to do something now that I knew what the problem was. Mind you, I had a caching plugin installed but it wasn’t doing much good. After thinking of what my options were I decided to go with Varnish Cache.

Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 360 other followers

%d bloggers like this: