[Plugin: W3 Total Cache] How I got my W3TC working with minify & gzip
-
it works!
it works!How to correct Minify&Gzip-errors with W3Total Cache W3TC 0.9.2.1
(based on M. Nieberg′s
https://kenntwas.de/2011/tips/tools-allgemein/english-version-wordpress-get-w3tc-0-9-2-1-running-with-minify-and-gzip-compression/ )*** make backups of: wp-content/plugins/w3-total-cache/lib/Minify/Minify/Controller/Base.php wp-content/w3tc/min/.htaccess root/.htaccess
*** edit wp-content/plugins/w3-total-cache/lib/Minify/Minify/Controller/Base.php change ,'encodeMethod' => 'zero' to ,'encodeMethod' => 'gzip' //MN: Was 'zero', set to gzip
*** set in admin Performance->Minify->General: Rewrite URL structure ON *** set in admin Performance->Browser Cache->Cascading Style Sheets & JavaScript: Enable HTTP (gzip) compression ON (this updates to your root/.htaccess)
*** edit wp-content/w3tc/min/.htaccess: (in "W3TC Minify core" part) change RewriteRule ^w3tc_rewrite_test$ index.php?w3tc_rewrite_test=1 [L] to RewriteRule ^w3tc_rewrite_test$ index.php?w3tc_rewrite_test=1 [QSA,L] add ReWriteCond %{REQUEST_FILENAME} !^.+\.gzip$ after RewriteCond %{HTTP:Accept-Encoding} gzip change RewriteRule (.*) $1%{ENV:APPEND_EXT} [L] to RewriteRule (.*) $1%{ENV:APPEND_EXT} [QSA,L] change RewriteRule (.*) index.php?file=$1 [L] to RewriteRule (.*) index.php?file=$1 [QSA,L]
*** edit root/.htaccess: remove a lot (60?) of linefeds which W3TC put. (in "W3TC Page Cache core" part) change RewriteRule ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [L] to RewriteRule ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [QSA,L] ("BLOGSUB/" is the name of your WP subdirectory, is missing if installed in root) change RewriteRule .* "/BLOGSUB/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [L] to RewriteRule .* "/BLOGSUB/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [QSA,L]
*** make both .htaccess files writeprotected by ftp: delete the write flags (doesnt work for me - i only get it down to 644 not 444) after i look in admin Performance, i got the two fleshy bars: Disk enhanced page caching is not active..auto install Minify is not active..auto install .. but i ignore them because my site works! minify & gzip is ok now! i know the changes will be overwritten if i change my W3TC settings again.
- The topic ‘[Plugin: W3 Total Cache] How I got my W3TC working with minify & gzip’ is closed to new replies.