Support » Plugin: WP Minify » wp-minify not working on all pages

  • I have wp-minify setup on my site, but it isn’t working on any page other than one that has BBpress stuff on it.

    Its easy to which pages it isn’t working on by viewing the source code. On the forum pages, it works beautifully (I have it set to minify css, html, and ja with a few js exclusions), but on the homepage, and any other page, whether they are standard wordpress pages or buddypress pages, it fails to work at all.


    I have no URLs excluded in the settings. Any ideas about this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • I thought maybe there was some issues with BBPress so I deactivated it, and it didn’t change anything. Without BBPress on my site, the wp-minify doesn’t work on any pages at all (for my it only seems to work on pages with bbpress content on them).

    Is this plugin prone to plugin conflicts? I looked through the code of it, but really didn’t get an understanding of how it works.

    Anyone have thoughts about this issue?

    I’d be happy to help considering how the plugin worked perfectly for me even after upgrading to the latest wp (3.4.1).

    I checked your site but noticed the plugin isnt turned on.

    Can you create a test page that disables W3 Total Cache and enables WP-Minify for that page only (don’t minify the HTML for that page)?

    My guess is your page doesn’t w3 validate. I did a quick check and noticed 50+ errors.

    Also take note that when you use this plugin and make use of the css/js minify by not using the special <!– WP-MINIFY –> tags this plugin will by default place the minified css/js file at the first css/js file it found in the output page. Doing so can potentially break your page since you may be making javascript calls too early/late.

    This plugin has some bugs which i and a few others here have fixed independently but they aren’t ones that prevent it from functioning.

    Thanks for chiming in on this, to help troubleshoot this, I’ve deactivated W3TC and turned wp-minify back on. The site is back in the condition it was when I started this thread.

    Ok i think i know what your problem is….

    When i check your source for homepage and forum i did notice one interesting thing….i actually think this plugin IS working for the homepage but found nothing to minify. Here is what’s going on:

    All your js/css files on the homepage (and most on the forum) are files located on your CDN (and a few on Google). This plugin will only minify, by default, files that are on your local server at So you have to add any domains (partial matches are fine) that are not local (i.e., “teatradenetwork” and “googleapis”) into the config admin page (“External JS/CSS Files”) for this plugin — 1 partial domain per line. This should resolve your problem. You can then set up your cdn to pull the newly created single cache file (js and css) back to itself so as to host it from there instead of locally (assuming your cdn is advanced enough to do that).

    Just be aware though that i did notice you have some inline js code and am not sure if it is placed in certain areas for a reason which require specific js files to be loaded at certain times….by caching them via this plugin in one area (by default, at the top) you might need to be careful and might need to relocate the inline code before the cache file loads in if the code requires it to be done so (eg., some times people like to initialize variables inline before loading the required js file done after it).

    Hope that helps.

    I’m already certain that the CDN isn’t causing the issue. Even with the CDN, the forum pages get properly minified. For the time being, I turned off the CDN and everything is being loaded through the server now.

    I have had some issues with the inline code as you mentioned. One of the plugins (Ninja Forms) uses both inline JS and JS files. I found that when I minified the JS files, the contact form stopped working. The solution was simply to exclude the JS files from being minified. I’ve already pared down the list to keep things working though. The remaining JS files that are not minified are done so intentionally right now because adding the causes problems. They are mostly theme files, the minified files (which can be seen in the source code in the forum pages where it is the only place wp-minify is currently working.) contain pretty much all the plugin JS.

    Interesting stuff! Thanks for turning off CDN for now. Makes it easier to hunt.

    Would you mind posting the contents of the error.log file that is found in the wp-minify plugin directory? If you dont see any then check the error.log file that is in root for any relevant errors assoc. with wp-minify and post them here. Apparently wp-minify is getting a fatal error from the homepage and abandoning the process.

    Btw, its not a big deal but i just quickly spotted that you have “<script tipe=” instead of “<script type=” on line 93. It’s not what is causing the problem but just wanted to let you know. Even though you are using HTML5 its nice to see you are using the “type=” part still even though html5 doesnt need it (this plugin probably needs it).

    ALSO, you mentioned that the contents of the minified files (of the forum pages) are related to a plugin. Curious, are those same plugin files in those minified js/css also located on the homepage but are not being minified?

    I ask because I am wondering if they dont exist on the homepage then wp-minify will have nothing to minify since all the other js and css files on the page you have chosen to intentionally not have minified (as is seen in the source of your forum pages).

    Checked the error logs and there is nothing related to minify or the javascripts involved (there are errors, but nothing related). Nothing to suggest a fatal error occuring everytime the front page is loaded.

    The plugin files that are minified are on every page (which was one of the driving forces making me want a plugin like this.) When you look at the front page, you’ll see the complete list of JS files that the site uses, and then, when you look at the forum pages, you’ll see that the list is shorter because of the minification.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wp-minify not working on all pages’ is closed to new replies.