109
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
1 |
=== WP Super Cache ===
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
2 |
Contributors: donncha
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
3 |
Tags: performance,caching,wp-cache,wp-super-cache,cache
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
4 |
Tested up to: 2.8.6
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
5 |
Stable tag: 0.9.8
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
6 |
Requires at least: 2.6
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
7 |
Donate link: http://ocaoimh.ie/gad/
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
8 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
9 |
A very fast caching engine for WordPress that produces static html files.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
10 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
11 |
== Description ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
12 |
This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
13 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
14 |
The static html files will be served to the vast majority of your users, but because a user's details are displayed in the comment form after they leave a comment those requests are handled by PHP. Static files are served to:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
15 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
16 |
1. Users who are not logged in.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
17 |
2. Users who have not left a comment on your blog.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
18 |
3. Or users who have not viewed a password protected post.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
19 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
20 |
99% of your visitors will be served static html files. Those users who don't see the static files will still benefit because they will see regular WP-Cache cached files and your server won't be as busy as before. This plugin will help your server cope with a front page appearance on digg.com or other social networking site.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
21 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
22 |
If for some reason "supercaching" doesn't work on your server then don't worry. Caching will still be performed, but every request will require loading the PHP engine. In normal circumstances this isn't bad at all. Visitors to your site will notice no slowdown or difference. Supercache really comes into it's own if your server is underpowered, or you're experiencing heavy traffic.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
23 |
Super Cached html files will be served more quickly than PHP generated cached files but in every day use, the difference isn't noticeable.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
24 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
25 |
See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further information.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
26 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
27 |
The [changelog](http://svn.wp-plugins.org/wp-super-cache/trunk/Changelog.txt) is a good place to start if you want to know what has changed since you last downloaded the plugin.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
28 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
29 |
== Changelog ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
30 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
31 |
= 0.9.8 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
32 |
* Added Spanish translation by Omi.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
33 |
* Added Italian translation by Gianni Diurno.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
34 |
* Addded advanced debug code to check front page for category problem. Enable by setting $wp_super_cache_advanced_debug to 1 in the config file.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
35 |
* Fixed wordpress vs wordpress_logged_in cookie mismatch in cookie checking function.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
36 |
* Correctly check if WP_CACHE is set or not. PHP is weird.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
37 |
* Added wp_cache_clear_cache() to clear out cache directory.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
38 |
* Only show logged in message when debugging enabled.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
39 |
* Added troubleshooting point 20. PHP vs Apache user.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
40 |
* Fixed problem deleting cache file.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
41 |
* Don't delete cache files when moderated comments are deleted.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
42 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
43 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
44 |
= 0.9.7 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
45 |
* Fixed problem with blogs in folders.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
46 |
* Added cache file listing and delete links to admin page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
47 |
* Added "Newest Cached Pages" listing in sidebox.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
48 |
* Made admin page translatable.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
49 |
* Added "How do I make certain parts of the page stay dynamic?" to FAQ.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
50 |
* Advanced: added "late init" feature so that plugin activates on "init". Set $wp_super_cache_late_init to true in config file to use.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
51 |
* Disable supercaching when GET parameters present instead of disabling all caching. Disable on POST (as normal) and preview.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
52 |
* Fixed problem with cron job and mutex filename.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
53 |
* Warn users they must enable mobile device support if rewrite rules detected. Better detection of when to warn that .htaccess rules must be updated (no need when rewrite rules not present)
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
54 |
* Advanced: Added "wpsupercache_404" filter. Return true to cache 404 error pages.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
55 |
* Use the wordpress_test_cookie in the cache key.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
56 |
* Show correct number of cache files when compression off.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
57 |
* Fixed problem with PHP safe_mode detection.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
58 |
* Various bugfixes and documentation updates. See Changelog.txt
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
59 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
60 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
61 |
= 0.9.6.1 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
62 |
* Move "not logged in" message init below check for POST.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
63 |
* Add is_admin() check so plugin definitely can't cache the backend.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
64 |
* Add "do not cache" page type to admin page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
65 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
66 |
= 0.9.6 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
67 |
* Add uninstall.php uninstall script.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
68 |
* Updated cache/.htaccess rules (option to upgrade that)
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
69 |
* Added FAQ about category and static homepage problem.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
70 |
* Add wp_cache_user_agent_is_rejected() back to wp-cache-phase2.php
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
71 |
* Show message for logged in users when caching disable for them.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
72 |
* Check filemtime on correct supercache file
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
73 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
74 |
= 0.9.5 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
75 |
* Show next and last GC times in minutes, not local time.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
76 |
* Don't serve wp_cache cache files to rejected user agents. Supercache files are still served to them.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
77 |
* If enabled, mobile support now serves php cached files to mobile clients and static cached files to everyone else.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
78 |
* Added checks for "WPSC_DISABLE_COMPRESSION" and "WPSC_DISABLE_LOCKING" constants to disable compression and file locking. For hosting companies primarily.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
79 |
* Added check for DONOTCACHEPAGE constant to avoid caching a page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
80 |
* Use PHP_DOCUMENT_ROOT when creating .htaccess if necessary.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
81 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
82 |
= 0.9.4.3 =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
83 |
1. Added "Don't cache for logged in users" option.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
84 |
2. Display file size stats on admin page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
85 |
3. Clear the cache when profile page is updated.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
86 |
4. Don't cache post previews.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
87 |
5. Added backslashes to rejected URI regex list.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
88 |
6. Fixed problems with posts and comments not refreshing.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
89 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
90 |
== Installation ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
91 |
1. You should have the Apache mod mime and mod rewrite modules installed and WordPress fancy permalinks enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use the slower WP-Cache part of the plugin.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
92 |
2. If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE define is 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.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
93 |
3. Upload this directory to your plugins directory. It will create a 'wp-content/plugins/wp-super-cache/' directory.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
94 |
4. If you are using WordPress MU you will need to install this in 'wp-content/mu-plugins/wp-super-cache/' and the file wp-cache.php must be copied into the mu-plugins directory.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
95 |
5. WordPress users should go to their Plugins page and activate "WP Super Cache".
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
96 |
6. Now go to Settings->WP Super Cache and enable caching. If you see an error message or a blank screen you may need to fix it. See the "FAQ" section later in this readme for instructions.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
97 |
7. 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:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
98 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
99 |
`-----------------.htaccess-----------------`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
100 |
`RewriteEngine On`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
101 |
`RewriteBase /`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
102 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
103 |
`RewriteCond %{REQUEST_METHOD} !=POST`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
104 |
`RewriteCond %{QUERY_STRING} !.*=.*`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
105 |
`RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
106 |
`RewriteCond %{HTTP:Accept-Encoding} gzip`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
107 |
`RewriteCond %{HTTP_user_agent} !^.*(2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
108 |
`RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
109 |
`RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
110 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
111 |
`RewriteCond %{REQUEST_METHOD} !=POST`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
112 |
`RewriteCond %{QUERY_STRING} !.*=.*`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
113 |
`RewriteCond %{QUERY_STRING} !.*attachment_id=.*`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
114 |
`RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
115 |
`RewriteCond %{HTTP_user_agent} !^.*(2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
116 |
`RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
117 |
`RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
118 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
119 |
`RewriteCond %{REQUEST_FILENAME} !-f`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
120 |
`RewriteCond %{REQUEST_FILENAME} !-d`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
121 |
`RewriteRule . /index.php [L]`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
122 |
`-----------------.htaccess-----------------`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
123 |
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:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
124 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
125 |
`# BEGIN supercache`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
126 |
`<IfModule mod_mime.c>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
127 |
` <FilesMatch "\.html\.gz$">`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
128 |
` ForceType text/html`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
129 |
` FileETag None`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
130 |
` </FilesMatch>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
131 |
` AddEncoding gzip .gz`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
132 |
` AddType text/html .gz`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
133 |
`</IfModule>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
134 |
`<IfModule mod_deflate.c>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
135 |
` SetEnvIfNoCase Request_URI \.gz$ no-gzip`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
136 |
`</IfModule>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
137 |
`<IfModule mod_headers.c>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
138 |
` Header set Cache-Control 'max-age=300, must-revalidate'`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
139 |
`</IfModule>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
140 |
`<IfModule mod_expires.c>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
141 |
` ExpiresActive On`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
142 |
` ExpiresByType text/html A300`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
143 |
`</IfModule>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
144 |
``
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
145 |
`# END supercache`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
146 |
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:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
147 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
148 |
`<Directory /home/www/>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
149 |
`AllowOverride All`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
150 |
`</Directory>`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
151 |
10. wp-content/advanced-cache.php loads the caching engine. This file is generated by the plugin. Make sure the path in the include_once() is correct.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
152 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
153 |
== How to uninstall WP Super Cache ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
154 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
155 |
Edit the file uninstall.php in your plugins/wp-super-cache/ directory and set
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
156 |
UNINSTALL_WPSUPERCACHE to a non blank value.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
157 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
158 |
`define( 'UNINSTALL_WPSUPERCACHE', '1' );`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
159 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
160 |
Open your browser and load wp-content/plugins/wp-super-cache/uninstall.php directly.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
161 |
You must be logged in, and you must confirm the action. If you do not delete the plugin
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
162 |
immediately, after the script runs, please comment out the define() above to stop
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
163 |
someone else running it.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
164 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
165 |
To manually uninstall:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
166 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
167 |
1. Remove the WP_CACHE define from wp-config.php. It looks like `define( 'WP_CACHE', true );`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
168 |
2. Clear the cache in the backend page and then deactivate the plugin on the plugins page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
169 |
3. Remove the Super Cache mod_rewrite rules from your .htaccess file.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
170 |
4. Remove the files wp-content/advanced-cache.php and wp-content/wp-cache-config.php
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
171 |
5. Remove the directory wp-content/cache/
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
172 |
6. Remove the directory wp-super-cache from your plugins directory.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
173 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
174 |
== If all else fails and your site is broken ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
175 |
1. Remove the WP_CACHE define from wp-config.php. It looks like `define( 'WP_CACHE', true );`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
176 |
2. Remove the rules (see above) that the plugin wrote to the .htaccess file in your root directory.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
177 |
3. Delete the wp-super-cache folder in the plugins folder.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
178 |
4. Optionally delete advanced-cache.php, wp-cache-config.php and the cache folder in wp-content/.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
179 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
180 |
== Frequently Asked Questions ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
181 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
182 |
= How do I know my blog is being cached? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
183 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
184 |
View the source of any page on your site. When a page is first created, you'll see the text "Dynamic page generated in XXXX seconds." and "Cached page generated by WP-Super-Cache on YYYY-MM-DD HH:MM:SS" at the end of the source code. On reload, a cached page will show the same timestamp so wait a few seconds before checking.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
185 |
In "HALF-ON" mode, if you have compression enabled, the text "Compression = gzip" will be added. If compression is disabled and the page is served as a static html file, the text "super cache" will be added. The only other way to check if your cached file was served by PHP script or from the static cache is by looking at the HTTP headers. WP-Cache (PHP) cached pages will have the header "WP-Super-Cache: WP-Cache". I used the <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP Headers</a> extension for Firefox to examine the headers. You should also check your cache directory in wp-content/cache/supercache/hostname/ for static cache files.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
186 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
187 |
= Why is WP-Super-Cache better than WP-Cache? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
188 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
189 |
This plugin is based on the excellent WP-Cache plugin and therefore brings all the benefits of that plugin to WordPress. On top of that it creates copies of every page that is accessed on a blog in a form that is quickly served by the web server. It's almost as quick as if the you had saved a page in your browser and uploaded it to replace your homepage.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
190 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
191 |
= Will comments and other dynamic parts of my blog update immediately? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
192 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
193 |
Comments will show as soon as they are moderated, depending on the comment policy of the blog owner. Other dynamic elements on a page may not update unless they are written in Javascript, Flash, Java or another client side browser language. The plugin really produces static html pages. No PHP is executed when those pages are served. "Popularity Contest" is one such plugin that will not work. Plugins that show different content for mobile users will probaby not work either.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
194 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
195 |
= Will the Super Cache compression slow down my server? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
196 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
197 |
No, it will do the opposite in fact. Super Cache files are compressed and stored that way so the heavy compression is done only once. These files are generally much smaller and are sent to a visitor's browser much more quickly than uncompressed html. As a result, your server spends less time talking over the network which saves CPU time and bandwidth, and can also serve the next request much more quickly.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
198 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
199 |
= How do I make certain parts of the page stay dynamic? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
200 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
201 |
WP Super Cache retains the dynamic loading code of WP Cache but only works in "half on" mode.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
202 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
203 |
There are two ways to do this, you can have functions that stay dynamic or you can include other files on every page load. To have a dynamic function in the cached PHP page use this syntax around the function:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
204 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
205 |
`<!--mfunc function_name( 'parameter', 'another_parameter' ) -->
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
206 |
<?php function_name( 'parameter', 'another_parameter' ) ?>
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
207 |
<!--/mfunc-->`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
208 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
209 |
The HTML comments around the mirrored PHP allow it to be executed in the static page. To include another file try this:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
210 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
211 |
`<!--mclude file.php-->
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
212 |
<?php include_once( ABSPATH . 'file.php' ); ?>
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
213 |
<!--/mclude-->`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
214 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
215 |
That will include file.php under the ABSPATH directory, which is the same as where your wp-config.php file is located.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
216 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
217 |
= Why doesn't WP UserOnline, Popularity Contest, WP Postratings or plugin X not work or update on my blog now? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
218 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
219 |
This plugin caches entire pages but some plugins think they can run PHP code every time a page loads. To fix this, the plugin needs to use Javascript/AJAX methods or the mfunc/mclude code described in the previous answer to update or display dynamic information.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
220 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
221 |
= Why doesn't the plugin cache requests by search engine bots by default? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
222 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
223 |
Those bots usually only visit each page once and if the page is not popular there's no point creating a cache file that will sit idle on your server.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
224 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
225 |
= Why shouldn't I create a cache file of every page on my site? =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
226 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
227 |
Like the previous question, there's no point caching pages that won't be visited. The large number of cache files will slow down the garbage collection system as it attempts to check each file. It also causes problems for hosting companies. In the event of a disk failure on your server it may take much longer to check the files. Remember how long a scandisk or a fsck took on a large drive?
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
228 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
229 |
= A category page is showing instead of my homepage =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
230 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
231 |
A tiny proportion of websites will have problems with the following configuration:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
232 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
233 |
1. Uses a static page for the front page.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
234 |
2. Uses /%category%/%postname%/ permalink structure.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
235 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
236 |
Sometimes a category page is cached as the homepage of the site instead of the static page. I can't [replicate the problem](http://wordpress.org/support/topic/237415/page/2?replies=38) but a simple solution is to switch the plugin to half-on mode. For normal traffic you will see no difference in the speed of your site.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
237 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
238 |
= Why do I get warnings about caching from http://ismyblogworking.com/ =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
239 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
240 |
"Your blog doesn't support client caching (no 304 response to If-modified-since)."
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
241 |
"Your feed doesn't support caching (no 304 response to If-modified-since)"
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
242 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
243 |
Supercache doesn't support 304 header checks. This is caching done by your browser, not your server. It is a check your browser does to ask the server if an updated version of the current page is available. If not, it doesn't download the old version again.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
244 |
The page is still cached by your server, just not by the browsers of your visitors. WordPress doesn't support 304 caching either so you're not losing out.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
245 |
Try the Cacheability Engine at http://www.ircache.net/cgi-bin/cacheability.py or http://redbot.org/ for further analysis.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
246 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
247 |
= Troubleshooting =
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
248 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
249 |
If things don't work when you installed the plugin here are a few things to check:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
250 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
251 |
1. Is wp-content writable by the web server?
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
252 |
2. Is there a wp-content/wp-cache-config.php ? If not, copy the file wp-super-cache/wp-cache-config-sample.php to wp-content/wp-cache-config.php and make sure WPCACHEHOME points at the right place. "plugins" should be "mu-plugins" if you're using WordPress MU.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
253 |
3. Is there a wp-content/advanced-cache.php ? If not, then you must copy wp-super-cache/advanced-cache.php into wp-content/. You must edit the file and change the path so it points at the wp-super-cache folder.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
254 |
4. If pages are not cached at all, remove wp-content/advanced-cache.php and recreate it, following the advice above.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
255 |
5. Make sure the following line is in wp-config.php and it is ABOVE the "require_once(ABSPATH.'wp-settings.php');" line:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
256 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
257 |
`define( 'WP_CACHE', true );`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
258 |
6. Try the Settings->WP Super Cache page again and enable cache.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
259 |
7. Look in wp-content/cache/supercache/. Are there directories and files there?
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
260 |
8. Anything in your php error_log?
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
261 |
9. If your browser keeps asking you to save the file after the super cache is installed you must disable Super Cache compression. Go to the Settings->WP Super Cache page and disable it there.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
262 |
10. The plugin does not work very well when PHP's safe mode is active. This must be disabled by your administrator.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
263 |
11. If pages are randomly super cached and sometimes not, your blog can probably be viewed with and without the "www" prefix on the URL. You should choose one way and install the [Enforce www preference](http://txfx.net/code/wordpress/enforce-www-preference/) plugin if you are using an old WordPress install. The latest versions redirect themselves (you should always be running the latest version of WordPress anyway!)
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
264 |
12. Private Server users at Dreamhost should edit wp-content/wp-cache-config.php and set the cache dir to "/tmp/" if they are getting errors about increasing CPU usage. See this [discussion](http://wordpress.org/support/topic/145895?replies=42) for more.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
265 |
13. File locking errors such as "failed to acquire key 0x152b: Permission denied in..." or "Page not cached by WP Super Cache. Could not get mutex lock." are a sign that you may have to use file locking. Edit wp-content/wp-cache-config.php and uncomment "$use_flock = true" or set $sem_id to a different value. You can also disable file locking from the Admin screen as a last resort.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
266 |
14. Make sure cache/wp_cache_mutex.lock is writeable by the web server.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
267 |
15. The cache folder cannot be put on an NFS or Samba or NAS share. It has to be on a local disk. File locking and deleting expired files will not work properly unless the cache folder is on the local machine.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
268 |
16. Garbage collection of old cache files won't work if WordPress can't find wp-cron.php. If your hostname resolves to 127.0.0.1 it could be preventing the garbage collection from working. Check your access_logs for wp-cron.php entries. Do they return a 404 (file not found) or 200 code? If it's 404 or you don't see wp-cron.php anywhere WordPress may be looking for that script in the wrong place. You should speak to your server administator to correct this or edit /etc/hosts on Unix servers and remove the following line. Your hostname must resolve to the external IP address other servers on the network/Internet use. See http://yoast.com/wp-cron-issues/ for more.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
269 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
270 |
`127.0.0.1 myhostname.com`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
271 |
A line like "127.0.0.1 localhost localhost.localdomain" is ok.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
272 |
17. If old pages are being served to your visitors via the supercache, you may be missing Apache modules (or their equivalents if you don't use Apache). 3 modules are required: mod_mime, mod_headers and mod_expires. The last two are especially important for making sure browsers load new versions of existing pages on your site.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
273 |
18. The error message, "WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed!" appears at the end of every page. Open the file wp-content/advanced-cache.php in your favourite editor. Is the path to wp-cache-phase1.php correct? If it is not the caching engine will not load.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
274 |
19. Caching doesn't work. The timestamp on my blog keeps changing when I reload. Check that the path in your .htaccess rules matches where the supercache directory is. You may have to hardcode it. Or use the plugin in Half-On mode.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
275 |
20. If supercache cache files are generated but not served, check the permissions on all your wp-content/cache/supercache folders (and each of wp-content cache and supercache folders) and wp-content/cache/.htaccess. If your PHP runs as a different user to Apache and permissions are strict Apache may not be able to read the PHP generated cache files. To fix you must add the following line to your wp-config.php (Add it above the WP_CACHE define.) Then clear your cache.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
276 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
277 |
`umask( 0022 );`
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
278 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
279 |
== Custom Caching ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
280 |
It is now possible to hook into the caching process using the add_cacheaction() function.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
281 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
282 |
Three hooks are available:
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
283 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
284 |
1. 'wp_cache_get_cookies_values' - modify the key used by WP Cache.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
285 |
2. 'add_cacheaction' - runs in phase2. Allows a plugin to add WordPress hooks.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
286 |
3. 'cache_admin_page' - runs in the admin page. Use it to modify that page, perhaps by adding new configuration options.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
287 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
288 |
There is one regular WordPress filter too. Use the "do_createsupercache" filter
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
289 |
to customize the checks made before caching. The filter accepts one parameter.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
290 |
The output of WP-Cache's wp_cache_get_cookies_values() function.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
291 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
292 |
See plugins/searchengine.php as an example I use for my [No Adverts for Friends](plugin at http://ocaoimh.ie/no-adverts-for-friends/)
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
293 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
294 |
== Links ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
295 |
[WP Widget Cache](http://wordpress.org/extend/plugins/wp-widget-cache/) is another caching plugin for WordPress. This plugin caches the output of widgets and may significantly speed up dynamic page generation times.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
296 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
297 |
== Updates ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
298 |
Updates to the plugin will be posted here, to [Holy Shmoly!](http://ocaoimh.ie/) and the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) will always link to the newest version.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
299 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
300 |
== Thanks ==
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
301 |
I would sincerely like to thank [John Pozadzides](http://onemansblog.com/) for giving me the idea for this, for writing the "How it works" section and for testing the plugin through 2 front page appearances on digg.com
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
302 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
303 |
Thanks to James Farmer and Andrew Billits of [Edu Blogs](http://edublogs.org/) fame who helped me make this more WordPress MU friendly.
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
304 |
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
305 |
Translators who did a great job converting the text of the plugin to their native language. Thank you!
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
306 |
[Gianni Diurno](http://gidibao.net/) (Italian)
|
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff
changeset
|
307 |
[Omi](http://equipajedemano.info/) (Spanish)
|