WordPress Caching: WP-Cache Plugin - Blank Page Bug Fix

May 28, 2006 on 11:23 pm | In cache, caching, wordpress | 6 Comments

Last week we wrote a quick how-to on caching with WordPress, by using the WP-Cache 2 plugin. It seems that there is a small bug in the code which may effect some people.

After you install and enable the plugin, if you are getting a blank page when you first go to your site, you need to follow these instructions to fix the bug.

  1. Disable the WP-Cache plugin.
  2. Switch to the “wp-content/plugins/wp-cache” directory.
  3. Make a backup of all the files in this directory.
  4. Open the “wp-cache-phase2.php” file.
  5. Search for “ob_end_clean()“.
  6. Replace it with “ob_end_flush()“.

Now, you should be all set. Go ahead and Enable the WP-Cache plugin, and you should be able to pull up your website.

Wordpress Caching How To

May 20, 2006 on 12:44 am | In cache, caching, digg, wordpress | 7 Comments

On Friday afternoon one of the articles we posted made front page of digg. After about 3-5 minutes the server load shot up to about 200, which pretty much took the machine offline. Our host was able to get on the machine, disable the site temporarily, and get the server functional again.

We spent the next half hour researching caching options for wordpress. We finally decided to setup WP-Cache 2.0.

WP-Cache is an extremely efficient WordPress page caching system to make your site much faster and responsive. It works by caching Worpress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and then building the page from the database. WP-Cache allows to serve hundred of times more pages per second, and to reduce the response time from several tenths of seconds to less than a millisecond.

Once we setup caching we were then able to bring the website back up, and keep the server load to about 10-15, which was more than acceptable, especially for being on the front page of digg.

So, here is a quick how-to on setting up caching on your wordpress to be (a little more) prepared for a high burst of traffic.

  1. Download WP-Cache 2.0
  2. Unzip the file, and place the contents in wp-content/plugins/wp-cache/
  3. Create wp-content/cache directory, and make sure that Wordpress can write to it
  4. Activate the plugin in the Plugins screen
  5. Add the following line to you wp-config.php file: define(’WP_CACHE’, true);
  6. Under the Options screen, select “WP-Cache” and enable caching.
  • For further instructions and troubleshooting, please read the README file included in the zip.
    Your wordpress should be caching now. You can now play around with the settings in the WP-Cache screen to customize it to your liking. You can also see how many pages are being cached, in that same screen.Please be aware that although you are now caching, depending on your hardware and connection type to the internet, your server might still not be able to handle all the load.

Powered by WordPress with design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^