{"id":496,"date":"2007-11-08T00:01:54","date_gmt":"2007-11-07T23:59:42","guid":{"rendered":"http:\/\/neosmart.net\/blog\/2007\/getting-wordpress-super-cache-to-run-on-a-windows-iis-or-apache-server\/"},"modified":"2023-01-28T15:54:01","modified_gmt":"2023-01-28T21:54:01","slug":"getting-wordpress-super-cache-to-run-on-a-windows-iis-or-apache-server","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/getting-wordpress-super-cache-to-run-on-a-windows-iis-or-apache-server\/","title":{"rendered":"Getting WordPress Super Cache to Run on a Windows (IIS or Apache) Server"},"content":{"rendered":"<p>If you&#8217;re a regular reader, you probably know by now that we just <em>love<\/em> performance and can&#8217;t get enough of server performance-improving software\/code&#8230; Especially when it comes to WordPress.<\/p>\n<p>Donncha <a href=\"http:\/\/ocaoimh.ie\/2007\/11\/05\/wordpress-super-cache-01\/\" rel=\"follow\">has recently released<\/a> a great plugin for WordPress, called &quot;WordPress Super Cache.&quot; It builds on the original WP-Cache plugin by Ricardo Granada &#8211; except that it fixes all the bugs in the original implementation and has been written in enough pure PHP that it&#8217;ll also run on Windows servers &#8211; both IIS and Apache for that matter! &lt;cue applause&gt;<\/p>\n<p>At the moment (as of version 0.3.1) it needs a bit of work to make it run, but not much. So here goes &#8211; 10 easy steps to get cached content on your IIS or Apache server under Windows:<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>Download Donncha&#8217;s plugin <a href=\"http:\/\/ocaoimh.ie\/wp-super-cache\/\" rel=\"follow\">here<\/a>. <\/li>\n<li>Extract it so you have a <code>\/wp-content\/plugins\/wp-super-cache\/<\/code> directory with all the files (like wp-cache.php) in there. <\/li>\n<li>Copy      <br \/><code>\/wp-content\/plugins\/wp-super-cache\/wp-cache-phase1.php<\/code> to       <br \/><code>\/wp-content\/advanced-cache.php<\/code> <\/li>\n<li>Open up <code>\/wp-content\/plugins\/wp-super-cache\/wp-cache.php<\/code> and locate this:      <br \/><pre lang='php'>function wp_cache_check_link() {&lt;br \/&gt;\n    global $wp_cache_link, $wp_cache_file;<\/pre> <\/li>\n<li>Replace that with <pre lang='php'>function wp_cache_check_link() {&lt;br \/&gt;\n\tglobal $wp_cache_link, $wp_cache_file;&lt;\/p&gt;\n&lt;p&gt;\tif ( file_exists($wp_cache_link) )&lt;br \/&gt;\n\t    return true;&lt;br \/&gt;\n\telse {&lt;br \/&gt;\n\t    echo &amp;#8220;&lt;code&gt;advanced-cache.php&lt;\/code&gt; does not exist&lt;br \/&gt;&amp;#8220;;&lt;br \/&gt;\n\t    echo &amp;#8220;Create it by copying &lt;code&gt;$wp_cache_file&lt;\/code&gt; to &lt;code&gt;$wp_cache_link&lt;\/code&gt; on your server&lt;br \/&gt;&amp;#8220;;&lt;br \/&gt;\n\t    return false;&lt;br \/&gt;\n\t}<\/pre> <\/li>\n<li>Log into your dashboard and enable WP Super Cache in the Plugins page.<\/li>\n<li>Go to the WP Super Cache options page and enable caching.<\/li>\n<li>Open <code>\/wp-content\/wp-cache-config.php<\/code> and look for <code>\"WPCACHEHOME\"<\/code> and correct     <br \/>a) Add an opening quotation mark before &quot;C:\\&quot;      <br \/>b) Replace all &quot;\\&quot; with &quot;\\\\&quot; or &quot;\/&quot;<\/li>\n<li>Create your rewrite rules like it says in readme.txt. If your using Apache on Windows, use mod_rewrite. If you&#8217;re using IIS, you&#8217;ll need to use the 3rd party (non-free, but quite good) <a href=\"http:\/\/www.helicontech.com\/isapi_rewrite\/\" rel=\"follow\">ISAPI_Rewrite 3.0<\/a> <\/li>\n<li>If you have mod_gzip, mod_deflate, or IIS dynamic content caching enabled, make sure you <strong>don&#8217;t<\/strong> enable Super Cache gzip because it&#8217;s already being done on the server level (which is better, anyway! :)) <\/li>\n<\/ol>\n<p>Don&#8217;t forget to install either our <a href=\"https:\/\/neosmart.net\/blog\/xcache-and-eaccelerator-wp-plugins-updated\/\" rel=\"follow\">XCache or eAccelerator plugins<\/a> to speed up the stuff that WordPress Super Cache <em>doesn&#8217;t<\/em> cache, such as logged-in users&#8217; visits and comment processing, etc. as well as visits by people who have commented (see below).<\/p>\n<p><strong>Known Issues<\/strong><\/p>\n<ul>\n<li><strike>WordPress Super Cache doesn&#8217;t cache the blog homepage. We&#8217;ve contacted the author (Donncha) and expect to get this fixed soon &#8211; it is <strong>not<\/strong> specific to Windows hosts.<\/strike><\/li>\n<li>The non-Super Cache code (basically, caching for users who have commented) <strong>does not work<\/strong> for posts. This is a known bug in the WP-Cache code that WordPress Super Cache is using as a second caching layer, and there is no way around it at the moment. Don&#8217;t worry, posts are still being cached, just not for people who post a comment. Make sure you&#8217;re using <a href=\"http:\/\/neosmart.net\/WP\/XCache\/\" rel=\"follow\">the XCache plugin<\/a> to avoid this being a bottleneck.<\/li>\n<\/ul>\n<p><strong>Update:<\/strong><\/p>\n<p>It seems that if you&#8217;re on an <em>Apache<\/em> server, it&#8217;s best to add a directive in httpd.conf stopping mod_gzip or mod_deflate from running in your WordPress directory, and instead using WordPress Super Cache&#8217;s built-in GZIP support. This is because Apache will not cache GZIP&#8217;d output, so you&#8217;ll end wasting thousands of precious CPU cycles re-GZIPping the same content over and over again. IIS users do not have to worry, IIS 6 GZIPs <em>and caches<\/em> all static content by default.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re a regular reader, you probably know by now that we just love performance and can&#8217;t get enough of server performance-improving software\/code&#8230; Especially when it comes to WordPress. Donncha has recently released a great plugin for WordPress, called &quot;WordPress &hellip; <a href=\"https:\/\/neosmart.net\/blog\/getting-wordpress-super-cache-to-run-on-a-windows-iis-or-apache-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[564,227,565,54,563,562],"class_list":["post-496","post","type-post","status-publish","format-standard","hentry","category-software","tag-performance","tag-plugins","tag-server-optimization","tag-wordpress","tag-wordpress-super-cache","tag-wp-cache"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-80","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":2,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":2455,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/496\/revisions\/2455"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}