How To: Improve Performance of WordPress Blogs

Most of highly trafficked and highly commented WordPress Blogs do rely upon some smart caching solution or another. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. This is because smart caching solutions re-create the cache whenever a new comment is posted. Steps: Download and […]

Most of highly trafficked and highly commented WordPress Blogs do rely upon some smart caching solution or another. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. This is because smart caching solutions re-create the cache whenever a new comment is posted.

Steps:

  1. Download and Install Wp-Cache 2 plugin.
  2. Modify wp-cache-phase2.php by either making it comment or  deleting the line:
    add_action('comment_post', 'wp_cache_get_postid_from_comment', 0); 
  3. Set the cache expiration time to 2 hours or more. This can easily handle a slashdot effect without breaking a sweat.

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted. They are however regenerated after the expiration of cache. This time lag saves an enormous amount of sql query when a post is heavily commented.

How To, Improve Performance of WordPress Blogs

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.