https://github.com/staylor/minify
Automagically combine your CSS and JS files
https://github.com/staylor/minify
Last synced: about 1 month ago
JSON representation
Automagically combine your CSS and JS files
- Host: GitHub
- URL: https://github.com/staylor/minify
- Owner: staylor
- Created: 2012-11-03T05:54:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-07-31T13:20:14.000Z (almost 11 years ago)
- Last Synced: 2025-10-28T12:31:32.735Z (8 months ago)
- Language: PHP
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
=== Minify ===
Contributors: wonderboymusic
Tags: assets, js, css, minify, performance
Requires at least: 3.0
Tested up to: 3.4
Stable Tag: 0.2
Automagically concatenates JS and CSS files that are output in wp_head() and wp_footer()
== Description ==
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]
Nginx - nginx.conf rule
rewrite ^/([_0-9a-zA-Z-]+)?/?wp-content/cache/minify-(.+)-(.*).(css|js)$ /wp-content/plugins/minify/make.php?hash=$2&type=$4&incr=$3&site=$1 last;
== Installation ==
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:
http://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
== Changelog ==
= 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]
== Upgrade Notice ==
= 0.2 =
Upgrade your .htaccess: 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]