WP-Minify Plugin for WordPress

While in previous post regarding Minify and Combine Js and CSS, I have mentioned that none of the plugins I have tried worked well, so I may work on my own plugin for combining and minifying CSS and JavaScript files. I am on the track but it has taken so many days and still there are so many things to do.

I will continue to work on my plugin but I got WP-Minify somehow working. Now, badly missing function is a way to store file at different location.

How the problem of WP-Minify not combining JavaScript files are solved?

1. At file wp-minify.php, line: 71, change the line:

add_action('wp_footer', array($this, 'post_content'));

to,

add_action('wp_footer', array($this, 'post_content'), 20);

I have added a comma and 20 to the line. Thanks to the post on WordPress forum.

This has not worked for me though. But this is useful with the following point.

2. In footer.php file, add the following line:

<!-- WP-Minify JS -->

Remember, the above solution may still fails you when you add the above line below wp_footer(); function call in footer.php file. My theme option has added line below that function call and it has failed. I was just lucky that time that I have experimented with that.

Features I missed in WP-Minify plugin:

  1. First is the bug which causes JavaScript file are not combined. Should be solved.
  2. Expire time is not working. Various methods to solve that has also failed. Tried by changing the time in wp-minify.php file but no use. Tried by running a query given on forum which also failed. This I can take care by Apache!
    I see by default, expiry header is 1 month.

    wp-minify header response

  3. Storing file at different location. This is needed as I am using Origin Pull for Images, JS and CSS