Surviving digg effect on wordpress

Posted by guru in October 23rd, 2007
Published in Wordpress

Since you have reached this page, I’m assuming that your website is hosted on a shared server and has already been a victim of digg effect (or atleast know what it means) - now you want a solution.

Its always good to share your articles on Digg, it makes sure that your voice is heard. Everything goes well until your article reaches Digg’s front page. From that point onwards your website won’t be in your control anymore, you won’t be able to open your control panel or access your files through ftp. The massive traffic coming from Digg will kill the server that has hosted your website.
If the administrator of the web server is monitoring the server there is no doubt that your account will be suspended. Even if the administrator is careless, you website won’t stay alive, there is no way that the server will be able to handle such traffic. You won’t have any other alternatives but to watch the traffic get wasted and feel helpless.

Optimizing wordpress for handling Digg traffic:

The first thing (and it is very important) you should do is, install a plug-in named wp-cache on wordpress. It simply caches your pages so that your server won’t have to execute same PHP code thousands of time per minute. To put it more simple, it changes your php files to html-like files.
Believe me, this really works, I’ve tried it and it works.

Go get it now, installing wp-cache could be a hard job, but you should not give up on this one, even if it takes 2 hours you won’t regret installing it.
Let me give you a tip though (for installing wp-cache):

  1. Before you activate wp-cache plugin on wordpress, login to your cpanel and open the filemanager.
    (You can also use ftp)
  2. Inside ‘/public_html’ find the directory named ‘wp-content’.
  3. Make sure you’ve set the permission for that directory to ‘777′, (although some might argue about security and stuff on doing this, this is your only chance of installing wp-cache without any headaches. And don’t worry about security, in a shared host environment other users will not have access to your folders anyway. If you are worried about the administrator accessing your files, you are better off buying a dedicated server, that way the whole issue won’t be an issue anymore)
  4. Now you can activate wp-cache, it will configure everything itself.

Link: Get the latest version of wp-cache!

Even more things that you can do:
Well these are the obvious things that you can do.

  • Keep it simple, use less graphics, if you don’t want to end up with zero bandwidth remaining.
  • Use less plug-ins or disable unused plug-ins (although this might not be a problem after installing wp-cache)
  • You can also try disabling comments, although everyone love getting comments on their article.
  • Try not to use CAPTCHAs! (For example on comment form)
  • Don’t make wordpress send you an email each time you get a comment (Its just not needed).
    (Disable it from ‘wp-admin/options-discussion.php‘ page, E-mail me whenever: Anyone posts a comment)
  • Get rid of anything that can abuse the server and has least importance.
  • Use less JavaScript? Just kidding! In fact spare the server and try to do more with Java Scripts if possible.

And if nothing works?
You don’t have many options really, do one of following.

  • Use blogger.com, it even lets you use your own domain name.
  • Use caching services like coral cache, i.e. submit the cached page on Digg. This has some obvious disadvantages. 
  • If your blog earns enough money for you, its time to buy a dedicated server.

One more thing that you can do is, wait for your article to become popular, once it is popular and listed on duggmirror.com, redirect the traffic to the cached page on duggmirror.com, to know more about duggmirror, visit their site.

How to redirect?

  • Using .htaccess file on your server. (Using Redirectmatch command). This is only possible if you can still access the server thorough cpanel or ftp, which is very unlikely.
  • Using http://everydns.net/ visit the site for more info.

Don’t feel shy to add your techniques below, through comment.

25 comments so far.

Follow-up this post comment rss or leave a trackback
mygif
Ian wrote,

Man, I can’t believe the comments above me… [The comment was deleted by administrator]

Anyways, good article. I think that having a good server is critical to surviving the digg effect. Sadly for those of us who are internation, I also think that hosting your Site in the US is very important for this kind of thing. US hosting is crazy cheap, which will bring things down, but also most traffic will come from the US. If you can’t afford a dedicated server then a VPS is definatly the next best option. Because you are capped as to how much resources you can use. This means your website will not bring the whole server down.

mygif

LLLOLOLOLOLOLOLOOLLO…

mygif
F1x wrote,

Thanks for the tips on Wp-Cache.

mygif
Zacharias wrote,

Next Article: Comment Moderation, or: How people can now find my article using the popular “go kill yourself” string.

mygif
Ryan wrote,

nice article!! Now I just need the visitors! Haha!

-errorhost.com

mygif
lb wrote,

LOL LOL LOL

mygif
Captain Obvious wrote,

Hmm, another option could be using a different server structure, such as MediaTemple’s Grid Service.

mygif
darvoun wrote,

these venom artists in the comments have serious problems.

mygif
Ryan wrote,

Don’t ask me why, but wp-cache made my site completely unreachable via internet explorer. I had to actually remove the wp-cache directory, AFTER disabling it to actually get rid of it.

mygif
WarriorRocker wrote,

One thing this article should address is how important it is to maintain an efficient website so not only your site is accessible but that in the increasingly likely chance your site is on a shared server it does not interrupt service for all the other users. After working at two cpanel based hosting companies we are no stranger to the digg effect. There are few things worse than wordpress. It causes high load in many default configurations. In the few seconds you save by not properly configuring your cms or using one to begin with will cause you hours of painful calls and emails to support convincing them you won’t ever do it again.

Moral? Use notepad or pico and discover the clever programmer within.

mygif
fak3r wrote,

While wp-cache and optimizing your site with less graphics, compressed css and js files help, things like hosting all of those objects on a separate server (Amazon’s S3 for example), running a reverse proxy cache (Squid) or even better an HTTP accelerator (Vanish) would give far more bang for the buck. If you’re on in a hosted environment demand that you have such options, otherwise find better hosting or go for a colo with other like-minded conspirators.

mygif
Acronyms wrote,

Nice Article. Clear and simple steps.

mygif
Sean Delaney wrote,

Welcome to the Dugg world!

mygif
Placid wrote,

” Make sure you’ve set the permission for that directory to ‘777?, (although some might argue about security and stuff on doing this, this is your only chance of installing wp-cache without any headaches. And don’t worry about security, in a shared host environment other users will not have access to your folders anyway. If you are worried about the administrator accessing your files, you are better off buying a dedicated server, that way the whole issue won’t be an issue anymore”

You have GOT to be kidding me. Security is *ALWAYS* an issue. Recommendations like this are part of the reason we have so many issues online. This should be changed to ‘temporarily set the permissions’ until the plugin is installed. This is common sense!

—Reply from the author—
I knew people would argue on this point, now we can argue about this a whole day and it’d never settle, but in general setting a folder’s permission to 777 is not as scary as anyone might think it is. As, for anyone to take advantage of those permissions they would need have an access to your server and its file system. That is only possibly if you have installed a vulnerable script or by direct access via ssh or telnet.
But seriously, If they actually manages to get into your server you’ll have much bigger security issues to worry about, for example, if someone has direct access to the files inside your ‘public_html’ directory, they’ll also be able to access ‘wp-config.php’ whose permission is set to 644 which means everyone can read it, now in that case anyone would be able to read your database settings (passwords, etc) from wp-config.php and wouldn’t it be something to worry about more? (Remember the file is accessed directly, not through PHP) Bottom line, there are enough security measures to make sure your files are not accessed directly and if it is accessed somehow, you’re in a bigger problem whether you have given read permission or write permission to those files.
As far as setting back the file permission to it’s original attribute is concerned, doing that will make wp-cache unable to function since it has to write files in there. Although it is not a good practice, it is your only chance to save much headaches for small blogs. You can always take some time (or a lot of) and figure out some other way to do that though.

mygif

I like the “Use blogger.com” option best.

Other than get in the PHP and start hacking stuff out there isn’t much to do other then use a different blog tool.

mygif
digg tester wrote,

commenting to see does your site stands :)

mygif

Two things you have neglected to mention that are probably much more effective, are to ask your host to enable “SQL query caching” and to use “http compression” …

This stops the “Digg effect” from becoming a problem, even before it starts ..

After you have been victim of the Digg Effect, is too late, and all that traffic is WASTED ..

—Reply from the author—
Thanks for more suggestations, I was with you till ‘SQL query caching’,
Although ‘HTTP compression’ is good for saving bandwidth, infact a lot of bandwidth in somecases, it also eats up some CPU time which is the main thing we can’t afford to happen in this case.

mygif

I have been blessed/cursed with a few items going to the front page of Digg. Dreamhost (not the best host in the world for a slam of traffic) did suggest that I disable the Sociable WP plugin. They said that it was being a resource hog. I think getting rid of that and having WP-cache gives you a better chance of staying up and running during a digg slam.

mygif
David Grega wrote,

Note that 777 permissions may not work on all servers. If the server administrator is using SuPHP or phpSuExec, the server will actually balk at 777 permissions and require nothing higher than 755 permissions instead. This is due to the fact that with SuPHP/phpSuExec, PHP scripts are run as the “cPanel user” rather than as user nobody negating the need for x77 permissions.

Just throwing that out there in case someone tries the 777 thing on a cPanel server and it causes things to stop working. Note, not all admins enable SuPHP/phpSuExec when they recompile Apache/PHP on a cPanel and WHM server.

mygif
sholdowa wrote,

@David,

There’s quite a difference between the meaning of 777 when applied to files and directories. Unfortunately you and the author are addressing different targets here.

mygif

Nothing much new about this.

mygif
chaoskaizer wrote,

here another tips for wordpress, try staticize Reloaded 2.0
http://photomatt.net/2004/06/13/staticize-reloaded/

mygif
Team Nirvana wrote,

Thanks for this tip.

I have come across this “wp-cache” information earlier, but never paid attention, but, your heading caught my attention and I read it here.

Thanks for sharing. Waiting for the hits in such a number anyway. Thanks again.

Pingback And Trackback

pingback and trackback from various blogs
mygif
193. Metagg mentions,

Metagg is tracking this post…

Find out what Social News Sites are discussing this post over at metagg.com…

mygif
230. play poker online mentions,

poker sportivo online…

Esso bwin casino spiel bank texas holdem estrategia on line casino juego casino portales web…

Leave A Reply Below

for "Surviving digg effect on wordpress"

 Username (*required)

 Email Address (*hidden)

 Website (*optional)

 Website (*optional)

Social Feeds

Topics Search

Main Translator

French

German version

Spanish version

Italian version

Categories

Recent Articles

Recent Posts

Recent Commentes

August 2008
M T W T F S S
« Oct    
 123
45678910
11121314151617
18192021222324
25262728293031

Blogroll

Navigation

Share!

Add to Technorati Favorites
Add to Google Add to Windows Live