• Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

VideoJS – multiple source demo

2022-03-08

Add custom field to Woocommerce tab

2022-03-07

Surror Product Tabs for WooCommerce

2022-03-07
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
SEO & Website build tips SEO & Website build tips
  • Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact
SEO & Website build tips SEO & Website build tips
Home»PHP»Using WP Super Cache with IIS 7
PHP

Using WP Super Cache with IIS 7

OxfordBy Oxford2021-05-01No Comments3 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email
If you are lucky enough to have attracted some traffic on your WordPress blog, you may find yourself stuck with an overloaded web server that gets bombarded from links on Google, Digg or Twitter.

Tags: iis infrastructure seo wordpress

  • Overview
  • Prerequisites
  • Installing the Plug-in
  • Configuring URL Rewriting
  • Enabling Caching in WordPress
  • Activating the Plug-in

Overview

Sooner or later you will discover the WP Super Cache plug-in for WordPress, but perhaps you’re running it on IIS 7 instead of Apache, and support for that is somewhat limited. Luckily, a two year old blog post on IIS Blogs still appears to work for the latest version of WordPress (3.0.1 at the time of this writing) and IIS 7.5, so that they will be presented here again in a somewhat condensed form.

Prerequisites

The steps below make the following assumptions:

  • The web server has the Microsoft URL Rewrite Module 2.0 installed
  • WordPress has Pretty Permalinks enabled.

Installing the Plug-in

The quickest way to install the plug-in is to use the plug-in manager in WordPress:

  1. Log on to your WordPress blog as administrator
  2. In the navigation menu, click Plugins → Add New
  3. Search for the term WP Super Cache
  4. Click Install Now in the search result for WP Super Cache.

Configuring URL Rewriting

WP Super Cache uses URL rewriting to redirect external requests to your blog posts and pages to a separate directory that contains static HTML and GZIPed pages. These static files are automatically created and maintained by the plug-in, and they are the reason for the blog’s improved performance, because they do not require PHP and database execution.

The WP Super Cache plug-in has been written for the Apache web server and will attempt to create and update .htaccess files within your WordPress installation, but those files have no effect when using IIS as the web server.

To configure URL rewriting for IIS, perform the following steps:

  1. Open the Web.config file in a text editor
  2. Add the following block right after the <rules> section near the top of the file and before the <rule> entry for the WordPress Pretty Permalinks configuration:
    <rule name="WP Super Cache" stopProcessing="true">
    <match url="^(\d{4})/(\d{2})/(.+?)/?$" ignoreCase="false" />
    <conditions>
      <add input="{REQUEST_METHOD}" negate="true" pattern="POST" ignoreCase="false" />
      <add input="{QUERY_STRING}" negate="true" pattern=".*=.*" ignoreCase="false" />
      <add input="{QUERY_STRING}" negate="true" pattern=".*attachment_id=.*" ignoreCase="false" />
      <add input="{HTTP_COOKIE}" negate="true" pattern="^.*(comment_author_|wordpress|wp-postpass_).*$" ignoreCase="false" />
      <add input="{DOCUMENT_ROOT}\wp-content\cache\supercache\{HTTP_HOST}\{R:1}\{R:2}\{R:3}\index.html" matchType="IsFile" />
    </conditions>
    <action type="Rewrite" url="wp-content/cache/supercache/{HTTP_HOST}/{R:1}/{R:2}/{R:3}/index.html" />
    </rule>
  3. Save and close the file.

The rules shown above apply to Pretty Permalinks in the Year/Month/Title format, for example http://blog.gerke-preussner.de/2010/11/using-wp-super-cache-with-iis-7-2/, and they will have to be adjusted for different Permalink formats.

Enabling Caching in WordPress

To enable serving cached WordPress files, make the following changes in the WordPress configuration file:

  1. Open the file wp-config.php from the root directory of your blog in a text editor
  2. Add the following line before the first require_once() function call at the bottom of the file:
    define('WP_CACHE', true);
  3. Save and close the file.

Activating the Plug-in

Finally, the plug-in can be activated in the WordPress administration interface:

  1. In the navigation menu click Settings → WP Super Cache
  2. Click on WP Super Cache
  3. On the Advanced tab…
    • Check Cache hits to this website for quick access
    • Select Use mod_rewrite to serve cache files.

The warning messages about Mod rewrite may not be installed and Rewrite rules must be updated apply to the Apache web server and can be ignored.

The plug-in should now be fully functional, and cached versions of the blog posts and pages should automatically be created in the \wp-content\cache\supercache directory. Please note that the plug-in will create sub-directories for each year, month and page.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

how to Set up a multisite via Drupal8?

2021-06-25

Drupal theme development

2021-06-17

Use the Windows Cache Extension for PHP

2021-05-01

php7.3 pregmatch problem

2021-04-26
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
May 2021
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Apr   Jun »
Tags
app branding culture design digital Docly docs etc faq fashion featured fitness fix github Helpdesk Image issue leisure lifestyle magento Manual marketing memecached Photography picks planing seo sequrity tips Travel trending ui/ux web WordPress 爬虫
Editors Picks

Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

2021-01-05
Top Reviews
8.9

Which LED Lights for Nail Salon Safe? Comparison of Major Brands

By Oxford
8.9

Review: Xiaomi’s New Loudspeakers for Hi-fi and Home Cinema Systems

By Oxford
70

CES 2021 Highlights: 79 Top Photos, Products, and Much More

By Oxford
Advertisement
Demo
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
About Us
About Us

Your source for the lifestyle news. This demo is crafted specifically to exhibit the use of the theme as a lifestyle site. Visit our main page for more demos.

We're accepting new partnerships right now.

Email Us: [email protected]
Contact: +1-320-0123-451

Facebook Twitter Instagram Pinterest YouTube LinkedIn
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
From Flickr
Ascend
terns
casual
riders on the storm
chairman
mood
monument
liquid cancer
blue
basement
ditch
stars
© 2025 Designed by 九号资源网.

Type above and press Enter to search. Press Esc to cancel.