WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP Super Cache

A very fast caching engine for WordPress that produces static html files.

  1. You should have the Apache mod mime and mod rewrite modules installed and WordPress custom permalinks (Settings->Permalinks) enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use PHP or legacy caching.
  2. If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE and WPCACHEHOME defines are deleted, and remove the files wp-content/wp-cache-config.php and wp-content/advanced-cache.php. These will be recreated when you install this plugin.
  3. Upload this directory to your plugins directory. It will create a 'wp-content/plugins/wp-super-cache/' directory.
  4. If you are using WordPress MU or WordPress Multisite you can install the plugin in the ordinary plugins folder and activate it "network wide".
  5. WordPress users should go to their Plugins page and activate "WP Super Cache".
  6. Now go to Settings->WP Super Cache and enable caching. If you see an error message or a blank screen see the "FAQ" section later in this readme for instructions.
  7. If you choose "Mod Rewrite caching", mod_rewrite rules will be inserted into your .htaccess file. Look in your web root directory for this file. It should look similar to this:

    -----------------.htaccess----------------- RewriteEngine On RewriteBase /

    RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{QUERY_STRING} !.*attachment_id=.* RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$ RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] -----------------.htaccess-----------------

  8. After you have enabled the plugin, look for the file "wp-content/cache/.htaccess". If it's not there you must create it. It should read:

    # BEGIN supercache <IfModule mod_mime.c> <FilesMatch "\.html\.gz$"> ForceType text/html FileETag None </FilesMatch> AddEncoding gzip .gz AddType text/html .gz </IfModule> <IfModule mod_deflate.c> SetEnvIfNoCase Request_URI \.gz$ no-gzip </IfModule> <IfModule mod_headers.c> Header set Cache-Control 'max-age=3, must-revalidate' </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/html A3 </IfModule> `` # END supercache

  9. Apache must be configured to allow the modules above. If you receive a "500 internal error" when serving requests to anonymous users you need to dig into your Apache configuration. This configuration in my virtual host works for me:

    <Directory /home/www/> AllowOverride All </Directory>

  10. wp-content/advanced-cache.php loads the caching engine. This file is generated by the plugin. It uses the constant WPCACHEHOME to load the caching engine.

Requires: 3.0 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-17
Downloads: 5,860,959

Ratings

4 stars
4.2 out of 5 stars

Support

6 of 100 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Works!

24 people say it works.
5 people say it's broken.

0,1,0
100,1,1
100,1,1
0,1,0 0,1,0 100,1,1 100,6,6 0,1,0
0,1,0 0,1,0 96,51,49 100,3,3
100,10,10 83,29,24 100,2,2 0,2,0
100,1,1 80,5,4 71,28,20 100,2,2 0,2,0
83,46,38 67,27,18 100,1,1 0,2,0
100,1,1 100,1,1 72,69,50 100,2,2 75,8,6 0,1,0 0,1,0 100,2,2 67,6,4
31,16,5 83,6,5 68,62,42 50,4,2 100,1,1
67,43,29 85,13,11 93,15,14 66,50,33 83,30,25 100,1,1 50,4,2
89,9,8 100,1,1 33,3,1
85,13,11 100,2,2 0,2,0
100,5,5 96,26,25 60,5,3
94,17,16 60,5,3
88,8,7 61,64,39 88,66,58 100,1,1
88,41,36
84,45,38
90,48,43
0,1,0 67,6,4 100,1,1
0,1,0 83,23,19
50,2,1 84,146,122 95,22,21 100,2,2 100,1,1
100,4,4 68,56,38
89,136,121 100,2,2
74,34,25 66,56,37
88,32,28 100,1,1
100,1,1 87,69,60 100,3,3
75,24,18 89,64,57 0,1,0 100,2,2 100,1,1
76,29,22 100,1,1
81,47,38 100,5,5 94,18,17 67,63,42
100,1,1 77,22,17
67,27,18 100,2,2
90,20,18 100,8,8
80,10,8
100,1,1 83,35,29
80,25,20
86,37,32
100,2,2
100,1,1
83,12,10
83,29,24