Skip to content
Jean edited this page May 25, 2018 · 2 revisions

If this page doesn't help, please post a question on our Google group.

Installing Minify for the first time

  1. Clone the minify git repository.
  2. The distribution contains a folder "min". Copy this into your DOCUMENT_ROOT so it is a direct child of DOCUMENT_ROOT (e.g. http://example.com/min/). Document roots are usually named htdocs, public_html, or www.
  3. Test if it can serve content by visiting this URL: http://example.localhost/min/?f=min/quick-test.js and http://example.localhost/min/?f=min/quick-test.css
  4. If you want to use the BuilderApp, you must enable it in min/config.php.

Note: The BuilderApp will not function properly in subdirectories, but it's not necessary for Minify's functionality.

Done!

(Optional) See TestingMinify if you'd like to run unit tests.

Hosting on Lighttpd

Minify comes with Apache mod_rewrite rules, but this does the same for Lighttpd:

url.rewrite-once = ( "^/min/([a-z]=.*)" => "/min/index.php?$1" )

Usage

Enable the BuilderApp via your config file. The default password is "admin", but even if no password is used there's very little server information disclosed.

Browse to http://example.com/min/

The Minify URI Builder will help you create URIs you can use to minify existing files on your site. You can see screenshots and get a feel for this process from this walkthrough on mrclay.org

More info here: https://github.com/mrclay/minify/blob/master/MIN.txt

You may want to disable the BuilderApp when not in use.

Configuration

min/config.php holds general config options.

min/groupsConfig.php holds preset groups of files to minify. (The builder application can help with this).

CookBook shows how to customize settings between production/development environments, and between groups.

CustomSource shows how to set some file/source-specific options, or serve content from a PHP script or URL.

Problems?

See CommonProblems and Debugging. You might also try TestingMinify (running test_environment.php in particular).

Clone this wiki locally