WordPress is a CPU hog – use caching plugins!
A few days ago I wrote about 38 ways to optimize and speed up your WordPress blog. One of the issues I touched on is the use of caching plugins, like WP-Cache 2 and WP Super Cache. Little did I know how important these plugins are for ensuring a smoothly running WordPress blog. Jeff Atwood at Coding Horror noticed that his tiny WordPress site was using huge amounts of CPU time. You can see the image of the results on his post. He says the following:
This is an incredibly scary result; blog.stackoverflow.com is getting, at best, a moderate trickle of incoming traffic. It’s barely linked anywhere! With that kind of CPU load level, this site would fall over instantaneously if it got remotely popular, or God forbid, anywhere near the front page of a social bookmarking website.
He then shows an image of how the blog’s CPU usage looked after installing the above-mentioned caching plugins. The improvement is tremendous, and he explains why he can’t understand why this type of caching isn’t built in to WordPress:
It’s not like this a new issue. Personally, I think it’s absolutely irresponsible that WP-Cache like functionality isn’t already built into WordPress. I would not even consider deploying WordPress anywhere without it. And yet, according to a recent podcast, Matt Mullenweg dismisses it out of hand and hand-wavingly alludes to vague TechCrunch server reconfigurations.
A default WordPress install will query the database twenty times every time you refresh the page, even if not one single element on that page has changed. Doesn’t that strike you as a bad idea? Maybe even, dare I say it, sloppy programming?
And it’s not like he’s setting higher standards for WordPress – he happily uses Movable Type which features static rendering, and he says that the .NET framework has had caching built in for years.
The point: install a caching plugin ASAP if you have not yet done so, and save yourself the problems of a sluggish, overweight site.
Category: Good Blogging Practice










That was exactly my thought when I wrote Traffic Proofing WordPress, but one thing I pointed out that you should mention is the fact that many, many plugins don’t play nice with caching plugins at all, especially ones that do counting, statistics, voting, polling, etc. In my post I like to Omninoggin, who has customized both Popularity Contest and WP-PostViews to do “javascript” counting to get around the caching issue.
Still to this day I can’t use any kind of caching on my main site because I get all kinds of 500 errors.
I use on my blog this free cache plugin: <a href=”http://www.tutorial.hu/wordpress-plugin-function_cache/” title=”">wordpress function cache plugin</a> (plugin by TLoF)
Sorry for HTML, please fix it.
Thanks, i wondered why my little-traffic websites have problems with cpu & ram usage.
@klou: You may also want to make sure your site hasn’t been hacked. We had one client whose site was using gigabytes of CPU and getting 20 visits a day. It was because of a hacker.