INCLUDE_DATA
This ain't no ordinary Affiliate Marketing Blog - Grab the Feed

Diggproof & Speed up Your Wordpress Blog

24. Mar 2007 | 55 Comments

With more & more blogs getting exposure on social news sites it’s not uncommon that you’ve experienced the wrath of the “Digg Effect” or been Slashdotted. It’s not fun, especially if you’ve got other sites hosted on the same server. So I decided to do a bit of research into the ways you can protect this from happening to your Wordpress Blog.

The main problem lies with the Wordpress Caching however there are also some simple server tweaks that you can apply to help streamline things even further.

I must admit I’ve applied a few of these tweaks to this blog but I’ve always known that my content isn’t overly “diggable” what with it being about SEO & Affiliate Marketing :p But regardless you should see a nice reduction in server load & mysql queries.

Upgrade to Wordpress 2.7

Wordpress 2.1 contains a lot of performance upgrades over previous versions. It contains much more efficient database code as all of the queries were carefully examined by some stop Mysql programmers before the release.

Install the WP Super Cache Plugin

WP-Cache 2.10 will cache a physical copy of each post into a specified folder on your server. Since Wordpress usually serves content dynamically it has to query mysql everytime it goes to load a post. If you get dugg you’ll end up with an insane amount of mysql queries that your server won’t be able to handle. Since this plugin creates a static copy of the page on the server you’re not actually loading any content from the database at all therefore the post will:

  1. Load Quicker
  2. Put less strain on the server

In theory you are able to server literally hundreds more pages per second than you normally would have before.

Choose the right Webhost

Naturally having a dedicated server with a fast processor & heaps of ram is considered the best there are less expensive options that you can consider.

If you have a VPS, please make sure you read my VPS Optimization Guide which will really give you the lowdown on tuning MYSQL & HTTPD.

The following Shared Hosts have been tested to be Digg Proof but it all depends on how many users are on your node & also how big the strain is on your server:

  1. MediaTemple
  2. Dreamhost
  3. GoDaddy
  4. A2Hosting
  5. A Small Orange
  6. Webfaction

Mysql Query Cache

Since pages are served dynamically every page load in Wordpress results in a Mysql Query, as stated before the WP-Cache plugin helps to reduce these queries but it’s also important to make sure you have the Query Cache optimised for maximum performance.

To activate the Mysql Query Cache:

  1. Find your mysql configuration file my.cnf
  2. Find the setting query-cache-type & change the value to 1
  3. Find the query-cache-size & change the value to 20M
  4. Find the query-cache-limit & change the value to 2M

You will need to make sure your host allows root access to the server in order to do this tweak.

PHP Compiler Cache

The PHP Compiler cache saves scripts in their compiled format on the server so that they’re not getting recompiled every time you call them from Wordpress.

It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimises scripts to speed up their execution. It typically reduces server load and increases the speed of your PHP code by 1-10 times.

Two popular Compiler Caches are APC & eAccelerator however I’m not going to go into any details about installing or configuring them.

Disable Unused Plugins

Disable any plugins that you currently don’t utilise in the plugins section of wordpress. It’s easy to leave 30-50 plugins active even when you’re not using them simply because most webmasters will try out so many different versions of a particular plugin.

Configuring Apache for Maximum Performance

Check out the complete guide to configuring apache for maximum performance this will help you make those fine tweaks to your httpd.conf. You’ll need root access to do this.

Optimising your Mysql Database

Optimising your Mysql Database can have a huge performance on your load times & load on the server, especially if you have a big database. Check out this picture of the effect it had on Weblogtools collection cpu usage.

Optimising your Mysql database is pretty easy:

  1. Log into PHPMyAdmin
  2. Locate your Wordpress DatabaseTables
  3. Make a Backup First
  4. Check all the tables in the Check Boxes
  5. Select the Optimise Tables Option
  6. That’s it!

I’ve also heard rumours that switching to InnoDB instead of MyIsam can have an effect on performance although I’ve not tested that myself, in fact I’m not even sure if it’s possible without causing errors.

Enjoy this post? Get the RSS Feed

Or get updates by email:


Prev Article: Sneaky Way to get Cheap Text Links

Next Article: Firing your Boss for Affiliate Marketing


Not making any Money yet? Check out these posts too:

Random Post: Want to earn more? Read a Random Post!

http://www.earnersblog.com/wp-content/plugins/sociofluid/images/digg_48.png http://www.earnersblog.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png http://www.earnersblog.com/wp-content/plugins/sociofluid/images/delicious_48.png http://www.earnersblog.com/wp-content/plugins/sociofluid/images/facebook_48.png http://www.earnersblog.com/wp-content/plugins/sociofluid/images/sphinn_48.png http://www.earnersblog.com/wp-content/plugins/sociofluid/images/twitter_48.png

55 Comments on "Diggproof & Speed up Your Wordpress Blog"

john anthony 24. Mar 2007, 6:59 pm

unfortunately dreamhost is not even close to being diggable. it’s not even netscapable… once my site hits about 5k uniques in a day, it either slows to a crawl or goes down.

Jeremy Steele 24. Mar 2007, 11:17 pm

My site has yet to get Dugg, but it has been hit by a few other social networking sites. HostGator shared hosting handled it easily, server load barely moved even.

Pigou 25. Mar 2007, 2:16 am

Yes switching to InnoDB could have an impact. Sady it would probably in the negative direction as InnoDb is known to be a bit slower.

Mike 25. Mar 2007, 5:40 am

I got dugg once and even though DreamHost could technically handle it (according to them), I noticed that the site was offline. They had disabled the account thinking it was getting a DDoS attack. Worse yet, they didn’t contact me and I had to discover that it was down on my own :(

Brandon Hopkins 25. Mar 2007, 1:42 pm

HostGator was horrible when I got dugg. They pulled my site offline and wouldn’t reinstate it for a full 18 hours!

Cucirca 25. Mar 2007, 7:18 pm

I’m using hostmonster and I’ve got to front page a few times. My account got suspended due to processor limit but after chatting on live support it was up in no time.

Bob 26. Mar 2007, 10:26 am

The WP-Cache can be quite helpful indeed but you need to find balance in caching times, hits and dynamic content.
Some nice tips, thanks

Andy Beard 26. Mar 2007, 1:05 pm

There are a few other things you can do such as

1. offsite caching of images
2. there is a plugin called Digg Defender, though I am not sure how well it works with 2.1
3. don’t show PPC advertising

Although worth more consideration is how you optimise to convert that traffic

Runa 26. Mar 2007, 9:07 pm

Some mysql hoster don’t allow the transition to the InnoDb mode

Everyday Weekender 27. Mar 2007, 1:15 pm

I have yet to experience the Digg effect.. maybe because my site isn’t appropriate for it

:(

Aniela 05. Apr 2007, 2:45 pm

Same here. Digg is definitely technology related. There’s a few digg-clones out there but getting on their front page doesn’t have the same effect as being on digg’s front page.

Robert Irizarry 17. Apr 2007, 9:54 am

I haven’t been dugg but I’m curious – Why do you qualify those particular shared hosts as Digg proof?

Investing Money 29. Apr 2007, 5:13 pm

I had problems with Dreamhost too. How many sites do you run on your account? I had about 4, and they were all so slow.

Avid Tech Super 8 Telecine 14. Jun 2007, 12:26 am

My WP ver 2.2 is as slow as and takes 30 seconds to load.I have tried cache plugin and things are no better, I also removed some pligins and still slow as.
I would love to get dugg, I think it would be an achievement not a problem.
I liked the post and did what was suggested and appreciate the info.

Callum 04. Sep 2007, 10:23 pm

I’m happy to say I’m the first person to digg you! Nice article. Overview level, but covers more bases than I’ve seen in other reviews and provides a good starting point for further research.

Edward Mills 28. Sep 2007, 12:40 am

Great tips. And apparently WP 2.3 should be even more efficient.

I’ve having the same experience with Hostgator as Brandon. They took my site down within 15-minutes of hitting the Digg front page and it’s still down more than 12-hours later. And they’re not doing a very good job of communicating about what’s happening over there.

On Dreamhost, I’ve got a friend who crashed their servers with a Netscape front page. But he’s switched to a new service they’re offering that lets you upgrade your server configuration on the fly. He says it’s worked great so far.

foolmeonce 11. Oct 2007, 2:22 pm

Stay far away from GoDaddy. Paid a fortune and before the site ever got near the bandwidth or storage capacity they locked the site down, threatened to delete everything unless we upgraded again.

Will 08. Nov 2007, 3:10 pm

I’ve been dugg on a few times with asmallorange.com and could barely even notice. Besides the 300+ comments in less than an hour. he-he

So yeah asmallorange.com is excellent joice to be digg proof. :)

David 10. Nov 2007, 2:20 am

we are with ASO as well WP and ASO best combo, ASO should be #1!

Sumesh 11. Nov 2007, 12:18 am

I’ve heard good things about ASO and MT.net, but others are despicable. Especially Godaddy and DH.

sufehmi 26. Dec 2007, 4:06 pm

Confirmed about Dreamhost, I have a personal blog, not very popular. One day it stopped working suddenly. Turned out it’s putting too much load on Dreamhost’s MySQL server, and got disabled.

For that blog, I got away by just installing the WP-Cache plugin.

However, some blogs are just too popular, you’ll need drastic measures and its own server for it.
I’ve helped several people to make their blogs performs faster while constantly getting hundreds of thousands daily hits.
It is possible for WordPress to perform much faster without investing in huge servers.

Ryan Ward 27. Dec 2007, 1:41 pm

The website has been down for a week (wp-cache)

kenblaue 29. Dec 2007, 7:27 am

I would also like to comment on Dreamhost. While I really love the service, control panels, the whole way they put their hosting system together, it pisses me off to no end that my small blog with no more than 30 or 40 unique visitors a day still does down AT LEAST once a week. The nag is that I’m monitoring my sites (on several ISP’s) with mon.itor.us

kenblaue 29. Dec 2007, 7:39 am

I would also like to comment on Dreamhost. While I really love the service, control panels, the whole way they put their hosting system together and especially the additional 2 gig’s a week or storage space! But it pisses me off to no end that my small blog with no more than 30 or 40 unique visitors a day still does down AT LEAST once a week. The nag is that I’m monitoring my sites (on several ISP’s) with mon.itor.us and I’m monitoring other sites hosted by Dreamhost. Many of these sites uses the exact same WP setup I’m using. We’re talking an average HTTP access time of around 1500ms, that with WP Super Cache! I know there’s a problem, but dreamhost will not address it unless i contact support during the downtime.

Also I was a MediaTemple customer for 2 years, there I was the most disappointed, not only was the hosting service slow and down on occasion, their support was horrible. At one point they refused to bill me in the same manner that the charges appeared on my credit card, so i couldn’t get reimburse for the costs.

On one positive note, I have been with WestHost, a small relatively no-named hosting service but their server performance has been the best I’ve worked with over the past 4 or 5 years.

I’ve also had few problems with GoDaddy.

LinuxAdmin 30. Dec 2007, 8:30 am

Use hosting companies that are Wordpress friendly and have some load balancing for front-ends and/or back-ends. With standard hosting companies you will be fine until the server is half-loaded and then if you get Dugg your site goes down for sure.

Ross 12. Jan 2008, 9:50 am

Gret post,

However I wouldn’t chose many of the hosts listed except Webfaction/Asmallorange who are awesome. If you are looking for simple blog hosting that can probably surviva a digg you might want to look at:

http://www.medialayer.com
http://www.doreo.com
http://www.unitedhosting.com
http://www.fluidhosting.com

Anyway check a few of those guys out.

Ross
http://www.hostdisciple.com

Dwayne 17. Jan 2008, 2:13 pm

Do most of the mysql hosters allow the transition to the InnoDb?

Stuart 17. Jan 2008, 4:06 pm

They should do Dwayne, it’s a fairly easy process :)

Mega performance guy 28. Jan 2008, 10:23 pm

If you are serious you should get a dedicated server box and do not use shared hosting…

Kevin 24. Feb 2008, 6:08 am

My site was dugg and the guys at Siteground shut down my site claiming a DOS attack and didn’t notify me. So I got them to get it back up after 4 hours and they would only let a certain number of users hit my site at a time. Having a dedicated server is the best insurance against the Digg effect.

Blagovest 12. Jul 2008, 5:51 am

A very important issue the article doesn’t mention is images and static content. Serving the images from another host will result in fewer HTTP requests, therefore less bandwidth and less processing overhead to the server where the blog is hosted. Moreover, complex web servers like Apache are not optimized for serving static content.

The WP-Offload plugin is especially designed for that. It will seamlessly mirror the images in your posts to external cache servers, thus eliminating most of the image requests to your server.

Gio 25. Aug 2008, 3:34 pm

Hey, I’m about to sound like a moron, but that’s fine with me… What about a free webhost? Ha, I havn’t completed it to go live, but at the same time I do not necessarily have a blog, but just a site really, lot’s of images borrowed from other servers where I store them.. videos too… there’s never been more than 4 people on my site.. so if it’s dugg… well, what do you say

Robert W 07. Dec 2008, 5:29 am

I’d say go with Hosting24, great host, unmetered space/bandwidth, free domain registration, option to have static IP, woot. On a 10/100mbps line

paula 20. Dec 2008, 5:24 pm

thank you this helped me figure out how to optimize my db.

things are getting speedier!

Atlanta Houses 10. Jan 2009, 10:13 pm

i am having problems with Dreamhost. that is in registering my account. please can you help me

Name Removed 04. Feb 2009, 3:05 am

I don’t know how to do most of the mysql hosters allow the transition to the InnoDb?

Supporters of the Cause

Popular Articles


Recent Posts

Affiliate Tools

Guides / Example Sites