這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Minify

描述

Similar to what we use on eMusic – this software is still experimental, but take a look!

Automagically concatenates JS and CSS files that are output in wp_head() and wp_footer() – stores / serves them from Memcached (if installed) or Database. In a load-balanced environment, the generation of flat files can be expensive and hard to distribute. Minify takes advantage of Memcached and Site Options / Transients to do the work once and share it among all servers in your cluster. File names are dynamically-generated to allow cache-busting of a CDN like Akamai that doesn’t always cache-bust by query string.

New .htaccess rule!
RewriteRule ^([_0-9a-zA-Z-]+)?/?wp-content/cache/minify-(.+)-(.*).(css|js)$ /wp-content/plugins/minify/make.php?hash=$2&type=$4&incr=$3&site=$1 [L]

安裝

You MUST add this rewrite rule to your .htaccess file or httpd.conf file and then restart your server:
RewriteRule ^([_0-9a-zA-Z-]+)?/?wp-content/cache/minify-(.+)-(.*).(css|js)$ /wp-content/plugins/minify/make.php?hash=$2&type=$4&incr=$3&site=$1 [L]

You need to install Memcached on your servers and use Ryan’s WP Object Cache backend in WordPress:
https://wordpress.org/extend/plugins/memcached/

If you don’t want to use Memcached:
1) you’re weird
2) all of the action will happen in the database

評價

2017年1月14日
I am pleased with the functionality of the plugin. Thanks for everything.
閱讀全部3個評價

貢獻者及開發者

“Minify” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Minify 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.1

  • Initial release

0.1.1

  • Added a missing semicolon, props Robert

0.2

  • change your .htaccess rule to: RewriteRule ^([_0-9a-zA-Z-]+)?/?wp-content/cache/minify-(.+)-(.*).(css|js)$ /wp-content/plugins/minify/make.php?hash=$2&type=$4&incr=$3&site=$1 [L]