This post will explain the various options in WP Minify WordPress plugin.
Basic Options
Enable JavaScript Minification
When checked, all JavaScript files will be extracted from the HTML output and be minified and served as one compressed JavaScript file.
Enable CSS Minification
When checked, all CSS files will be extracted from the HTML output and be minified and served as one compressed CSS file.
JavaScript files to exclude from minify
You may specify any patterns for excluding any Javascript files from the Minifying process. The entries are line delimited so if you specify:
prototype wp-greet-box/js googlecode.com
Then the following Javascript files will not get included into the Minifying process if it’s being enqueued via wp_enqueue_script():
- http://example.com/wp-includes/js/prototype.js
(matching first rule) - http://example.com/wp-content/plugins/wp-greet-box/js/functions.js
http://example.com/wp-content/plugins/wp-greet-box/js/onload.js
(matching second rule) - http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js
(matching third rule)
CSS files to exclude from minify
Works the same way as the “JavaScript files to exclude from minify” option except that this field will filter out CSS files.
Advanced Options
Manual JavaScript and CSS Placement
You can specify where you would like your minified JavaScript or CSS files to show up in your source. Just specify the following HTML comments wherever you would like your minified JavaScript and CSS to show up:
<!-- WP-Minify JS --> <!-- WP-Minify CSS -->
This setting will override default header or footer placements of minified JavaScript and CSS files.
Enable Minification on External Files
WP-Minify supports minification of external JavaScript and CSS files by downloading, caching, and feeding them to the minify engine. Although this helps speed things up considerably, there is a good chance that external JavaScripts will not work when downloaded. I wouldn’t recommend enabling this option unless you know what you’re doing and I want to add a bunch of excludes to the JavaScript exclusion list.
Place Minified JavaScript in footer
If you don’t feel like modify your theme to include the tags above, you may just enable this to include JavaScript in your footer.
Combine files but do not minify (Debug mode)
When checked, all Javascript and CSS files will still get merged into one file, but they will not be minified (i.e. spaces removed, etc). Comments will also be added to each line telling you what line number each line is. That way, you can easily troubleshoot any Javascript or CSS errors.
Debug off
WP Minify will embed a URL like the following:
http://omninoggin.com/wp-content/plugins/wp-minify/min/?f=www/wp-content/themes/omninoggin/onload.js
which will return the minified version of the script:
Debug on
WP Minify will embed a URL like the following (notice the &debug=true at the end):
http://omninoggin.com/wp-content/plugins/wp-minify/min/?f=www/wp-content/themes/omninoggin/onload.js&debug=true
which will return the non-minified version of the script:
Cache Expiration
WP Minify caches all external Javascript and CSS files that get queued via wp_enqueued_script() and wp_enqueue_style() functions. This setting lets you set the cache expiration policy and also lets you clear the cache on demand.
Additional Javascript files to minify
You may specify any additional Javascript files to be included in the minifying process here. The entries are line delimited, so you can specify them in the following manner:
http://example.com/path/to/file1.js http://example.com/path/to/file1.js http://example.com/path/to/file1.js
Additional CSS files to minify
Works the same way as the “Additional Javascript files to minify” option except that this field expects CSS files.
Extra arguments to pass to minify engine
This value will get append to calls to URL “wp-minify/min/?f=file1.js,file2.js,…,fileN.js”. I wouldn’t touch this unless you know the Minify engine API pretty well.
This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.