Title: W3TC Minify Helper
Author: Magenta Cuda
Published: <strong>February 14, 2019</strong>
Last modified: February 14, 2019

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/mc-w3tc-minify-helper.svg)

# W3TC Minify Helper

 By [Magenta Cuda](https://profiles.wordpress.org/magenta-cuda/)

[Download](https://downloads.wordpress.org/plugin/mc-w3tc-minify-helper.1.0.0.1.zip)

 * [Details](https://wordpress.org/plugins/mc-w3tc-minify-helper/#description)
 * [Reviews](https://wordpress.org/plugins/mc-w3tc-minify-helper/#reviews)
 *  [Installation](https://wordpress.org/plugins/mc-w3tc-minify-helper/#installation)
 * [Development](https://wordpress.org/plugins/mc-w3tc-minify-helper/#developers)

 [Support](https://wordpress.org/support/plugin/mc-w3tc-minify-helper/)

## Description

This is a helper plugin for the W3 Total Cache plugin. It generates a W3TC JSON 
configuration file that can be imported into W3TC.

The W3TC auto minify mode does not work on my web site. The problem is the order
of the JavaScript files using the auto minify mode is different from the order without
minification. This results in undefined JavaScript function errors. W3TC has a help
tool for manually setting the order of JavaScript files. I think this tool is tiresome
to use. I just want to have the same order as without minification. So, I wrote 
this plugin to do this.

This plugin needs to learn about the JavaScript files that your website uses. Every
view of a web page sets the ordered list of JavaScript files for the template of
that web page. If this ordered list has changed a new W3TC configuration file is
generated by modifying the value of the field ‘minify.js.groups’ of the current 
W3TC configuration to be compatible with the new ordered list of JavaScript files
for that template. This process is cumulative so after viewing a representative 
web page for each template a complete W3TC configuration file will be generated.
Further, if some time later the ordered list of JavaScript files for a template 
changes then this will also generate a new compatible W3TC configuration file.

N.B. – W3TC assumes that the ordered list of JavaScript files for a template is 
fixed. If your web pages are dynamically computing the JavaScript files and two 
different web pages using the same template compute different lists of JavaScript
files then W3TC cannot be used to minify those JavaScript files. Also, W3TC in manual
minify mode only sees the template files in the active theme directory. However,
using the ‘template_include’ filter a plugin can force WordPress to load a template
in the plugin’s directory instead of a template in the theme’s directory. W3TC in
manual minify mode cannot be used minify the JavaScript files of templates in plugin
directories.

The new JSON configuration file generated by this plugin can be downloaded, further
edited to fine tune the minify process and imported back into W3TC. The download
link is on the “Installed Plugins” admin page after the “Deactivate” link. But, 
before you import this new configuration file into W3TC, you should download the
current configuration of W3TC so that you can restore the current configuration 
if the new configuration does not work. Also, before importing the new configuration
file into W3TC you should diff the new configuration file against the current configuration
file to verify that the new configuration file has no obvious errors. You should
also verify that you have a complete configuration by viewing the ‘minify.js.groups’
section and checking that there is an entry for each of your templates.

N.B. – W3TC “Minify mode” must be set to “Manual” for W3TC to use the ordered list
of JavaScript files generated by this
 plugin.

## Installation

 1.  Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or
     install the plugin through the WordPress plugins screen directly.
 2.  Activate the plugin through the ‘Plugins’ screen in WordPress.
 3.  For each template view a representative web page using that template.
 4.  Download the W3TC JSON configuration file generated by this plugin using the link
     after the “Deactivate” link on “Installed Plugins” admin page.
 5.  Download the current W3TC configuration using the “General Settings” page of W3TC.
 6.  Optionally edit the new W3TC configuration file to fine tune the minify configuration.
 7.  Optionally diff the new W3TC configuration file against the current configuration
     file to verify the changes are reasonable.
 8.  Import the new configuration file into W3TC using the “General Settings” page 
     of W3TC.
 9.  If the new configuration does not work import the previously downloaded W3TC configuration
     file to restore the previous configuration.

## FAQ

  Where is the web site for this plugin?

[http://magentacuda.com/an-alternate-way-to-set-w3tc-minify-file-order/](http://magentacuda.com/an-alternate-way-to-set-w3tc-minify-file-order/)

  Where is the GitHub repository for this plugin?

[https://github.com/magenta-cuda/alt-w3tc-minify](https://github.com/magenta-cuda/alt-w3tc-minify)–
N.B. The directory name is different.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“W3TC Minify Helper” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Magenta Cuda ](https://profiles.wordpress.org/magenta-cuda/)

[Translate “W3TC Minify Helper” into your language.](https://translate.wordpress.org/projects/wp-plugins/mc-w3tc-minify-helper)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/mc-w3tc-minify-helper/),
check out the [SVN repository](https://plugins.svn.wordpress.org/mc-w3tc-minify-helper/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/mc-w3tc-minify-helper/)
by [RSS](https://plugins.trac.wordpress.org/log/mc-w3tc-minify-helper/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0.1

 * Reformat the readme.txt

#### 1.0

 * Initial

## Meta

 *  Version **1.0.0.1**
 *  Last updated **8 years ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **5.0.28**
 *  PHP version ** 7.0 or higher **
 * Tags
 * [javascript](https://wordpress.org/plugins/tags/javascript/)[minify](https://wordpress.org/plugins/tags/minify/)
   [W3TC](https://wordpress.org/plugins/tags/w3tc/)
 *  [Advanced View](https://wordpress.org/plugins/mc-w3tc-minify-helper/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/mc-w3tc-minify-helper/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/mc-w3tc-minify-helper/reviews/)

## Contributors

 *   [ Magenta Cuda ](https://profiles.wordpress.org/magenta-cuda/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/mc-w3tc-minify-helper/)