WP Super Cache V0.98 and IIS7

Today I installed the WordPress plugin WP Super Cache on IIS7 version 0.98. Let’s just say it was not all that fun, and I had to use a number of resources to get it working. Many thanks to Peng-Fei’s blog entry, which got me started, but didn’t quite take me over the finish line. The WordPress plugin help pages also added some info, but a couple of things I had to figure out myself.

Getting WP Super Cache V0.98 running on IIS7

  • Install the plugin as any other plugin
  • Give full access to your IIS_IUSRS (or whichever user you have configured ).
    • Activate the plugin
    • Goto the plugin configuration page in WordPress.
    • This should generate advanced_cache.php and wp-cache-config.php in the wp-content folder.
    • If these files are note generated, you should see an error in wordpress, and probably have to play with the user access rights until they ARE generated on a page reload.
  • Set the access rights back as they were before.
  • Now, I had a bug in the advanced-cache.php script. It uses CACHEHOME, but the variable is called WPCACHEHOME, so I tried changing this variable name throughout the file.
    • However, that didn’t work. Instead, I had to set the path explicitly in this file, like this:
<?php
# WP SUPER CACHE 0.8.9.1
function wpcache_broken_message() {
if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], ‘wp-admin’ ) )
echo “\n<!– WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! –>”;
}
if ( !include_once(  ‘wp-content/plugins/wp-super-cache/wp-cache-phase1.php’ ) ) {
if ( !@is_file( ‘wp-content/plugins/wp-super-cache/wp-cache-phase1.php’ ) )
register_shutdown_function( ‘wpcache_broken_message’ );
}
?>
This seemed to do the trick, and my pages are now cached. I still  see a CPU spike when loading them, but the html it generated and stored correctly in the new wp-content/cache folder.
You can check out my pages at my amazing sandwich blog.
    This entry was posted in software architecture and tagged , , , , . Bookmark the permalink.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>