The move to WordPress and the traffic that followed
On Tuesday evening, I converted this self-hosted site from a collection of simple, static HTML files to a full WordPress content management system.
And on Wednesday it received 93,112 page requests. Not the most my site has handled in a single day, but still atypical. All without any downtime, too.
Now, moving to WordPress had nothing to do with all the traffic. That was just a happy testing and validation accident.
The traffic surge all started with a post to Hacker News by someone I’ve never met. And I didn’t even notice the event until 8:45 that morning when their post made it all the way to the front page.
The funny thing is, this was a link to something I’d published and (mostly) forgotten about on Sunday. It was three days old by the time it got any real attention. Go figure.
Then sometime early Wednesday afternoon, John Gruber linked to the same page on Daring Fireball. Rene Ritchie piled on later with a link from iMore (and some damn good commentary). And other folks started linking to it as well.
Through it all, my server just kept humming along, not showing any significant memory load either.
What enabled all this reliability from a little WordPress blog? Just some common sense, really. But I can thank Guy English for at least one suggestion.
A few weeks ago when I first considered moving to WordPress, I noticed that Guy was using DreamHost for his blog, kickingbear. Since I also use DreamHost (they’re good people) and Guy’s blog was a WordPress site, I was curious if he had done anything special to survive his last Fireballing by our friend John Gruber.
The big difference in Guy’s configuration from mine was him using a virtual private server (VPS) instead of shared hosting. Good idea, I thought. Sure, it’s a little more expensive but there’s much more isolation that way, preventing the Apache HTTP server from getting too distracted.
Guy also suggested installing WP Super Cache, a plugin for WordPress. But I already made that a requirement. I’m not grotesquely stupid. Nobody should ever run a self-hosted WordPress site without some form of static page caching.
The other strategy I applied was a content delivery network (CDN) to offload stylesheets, scripts and images. This was easy since I was already using MaxCDN for my static site and WP Super Cache has built-in support for rewriting internal resource URLs to point at CDNs instead.
One thing I didn’t try was moving from FastCGI to XCache for PHP. I simply don’t have enough experience to know if that’s an advantage for WordPress, or the configuration tricks in making such a transition. But if you do, please comment on this post or contact me. I’m not above admitting ignorance or asking for help.
While 93,112 page requests seems like a large number for one day, it’s really only a little faster that one page per second on average. And the number of simultaneous users probably never got over 500.
A more stressful day on the site is still needed to shake things out and assuage all my fears about reliability. But this is a good start.
And a real incentive to write more.