Better WordPress Minify

Descrizione

Allows you to combine and minify your CSS and JS files to improve page load time. This plugin uses the PHP library Minify and relies on WordPress’s enqueueing system rather than the output buffer, which respects the order of CSS and JS files as well as their dependencies. BWP Minify is very customizable and easy to use.

Useful resources to help you get started and make the most out of BWP Minify

Don’t listen to bad reviews. I will tell you the truth:
This plugin will NOT break your site. It just change the way JS and CSS are executed, so if you see something wrong in your site after activating this plugin, there are two ways of fixing: Deactivate, Uninstall and remove cache OR Configure the plugin properly.
Read each configuration option twice, save and flush cache with each option you change. This way you will really see how this plugin works and will work with your theme/plugins too, with no conflicts. It only conflicts with few cache/optimization plugins.
This plugin is the most customizable, trust me you will love it as you realize the potential of this plugin.
Give it a try, configure it properly and you will never uninstall it.
Developer who made this plugin… THANKS A LOT.

After removing several plugins from my site after moving to a new host, BWM still showed all their js/css which was very confusing to say the least. A proper rescan of the site should definitely be implemented, rather than trusting on old data in the options table.

While, I’m sure this plug-in works well for most WordPress users, it seems to have conflicts with the “The7” theme (the footer style specifically didn’t show properly), and broke the “Revolution Slider” plug-in entirely. Though, everything was restored once I deactivated the plug-in.

Interessato allo sviluppo?

Changelog

1.3.3

* Fixed an issue with wrong `min/config.php` file.

1.3.2

* Marked as WordPress 4.0 compatible
* When updating BWP Minify, friendly minify url should be turned off automatically if required rewrite rules are not found. An appropriate error message will be shown once to notify owners of the site so that they can take appropriate actions.
* When friendly minify url is enabled, rewrite rules for both Apache and Nginx will be shown. This is to add support for Nginx as a reverse proxy.
* Fixed a bug that makes the detector fail to commit logs, which results in empty enqueued file lists.
* Other minor fixes and enhancements.
* BWP Minify now requires WordPress 3.1.0 or later.

1.3.1

Enhancements

Added an option to leave external enqueued files at their original positions.

Added compatibility for Maintenance plugin (BWP Minify will be inactive when Maintenance mode is on).

Improved settings on Manage enqueued files admin page to allow better control over enqueued files. Take a look at this updated section of official documentation for more details.

Improved friendly minify url feature to work better with cache plugins: friendly urls should show up on first load.

Bugs fixed

Fixed an issue where CDN hosts don’t replace the original host properly

Fixed an issue with SSL on wp-login.php page

Important Note: After updating to 1.3.1, users of Simple Google Maps Short Code plugin (or similar ones) and Avada theme should go to BWP Minify > General Options and turn on Leave external files at their original positions? setting to make map shortcodes work.

1.3.0

New Features

Added support for Friendly Minify strings, e.g. http://example.com/path/to/script.js (best used with CDN). This feature should work well on nginx server.

Provides a much better method to capture and print JS, CSS files.

Dependencies are more intelligently handled. This should fix many incompatibility issues with other plugins. Note: users of Leaflet Map Markers plugin will still need to add leafletmapsmarker handle to Script to be ignored (not minified).

Disable Minify bloginfo() setting by default. Modern themes should always use the enqueue system for any stylesheet.

admin-bar, jquery-core, and jquery-migrate are now ignored by default.

admin-bar and dashicon are now ignored by default

Changed default cache age to 1 day instead of 2 hours.

Users can now use BWP_MINIFY_CACHE_DIR and BWP_MINIFY_MIN_PATH constants to override the Cache Directory and Min Path setting in admin. This can become useful when mirroring a site.

Other minor enhancements.

Misc

Added a Serbo-Croatian translation – Thanks to Borisa Djuraskovic!

Added an Indonesian translation – Thanks to Nasrulhaq Muiz!

Added a Russian translation – Thanks to Эдуард Валеев!

Migration from 1.2.x

Minify URL setting has been replaced with Minify Path setting and you will have to manually update this setting if you’re using a non-default one. Note to Developers: the setting’s key has been changed from input_minurl to input_minpath. The hook bwp_minify_min_dir is still available but deprecated in favor of bwp_minify_min_path

1.2.3

BWP Minify is now WordPress 3.7 compatible (compatibility issues with WordPress 3.5 and 3.6 have been fixed).

Updated Minify library to version 2.1.7 (security fix). This updated version of Minify also comes with an updated version of CSSMin library, which solves relative path issues in some plugins’ CSS files (such as TablePress).

Added support for protocol-relative media sources.

Added partial support for bbPress forum plugin (quicktags script must be ignored for the Text editor to work, more info here).

Added a filter (bwp_minify_is_loadable) to allow other plugins to disable BWP Minify based on some criteria.

Fixed some script dependency issue when you choose to ignore certain scripts

Enhancements:

Increased default cache time to something longer (2 hours)

Cache directory can now be edited in admin area. Please note that changing the cache directory is still a two-step process, which has been described in great details here.

Misc:

Added a Turkish translation – Thanks to Hakan E.

Added a French translation – Thanks to Sebastien

Added an Italian translation – Thanks to Gabriele

1.0.10

Fixed two possible PHP notices when using root-relative paths as Minify URL. Thanks to Marcus!

Fixed wrongly closed HTML <link> tags.

Fixed a bug that breaks the dynamic JS file enqueued by Mingle plugin.

Fixed an incompatibility issue with WP Download Monitor.

Fixed an incompatibility issue with Geo-Mashup, thanks to JeremyCherfas for reporting!

Added support for the new script localization function introduced in WordPress 3.3. Thanks to workshopshed for reporting!

Added Romanian translation, thanks to Luke Tyler!

1.0.9

Fixed a possible PHP warning about an argument not being an array.

1.0.8

Hot fix for 1.0.7, which resolves the broken CSS issues for the wp-login page when you install WordPress in a sub-directory.

1.0.7

Hot fix for 1.0.6, which resolves some compatibility issues with certain plugins.

1.0.6

Added four more hooks for theme developers to fully control how scripts and styles should be enqueued and minified.

Changed the Min URL hook a bit so themes can actually filter it.

Added support for plugins or themes that try to enqueue and print script using the wp_footer action instead of the init action. Plugins like ‘Jetpack by WordPress.com’ should be working correctly now.

Other improvements made to the positioning of styles and scripts.

Enjoy BWP Minify!

1.0.5

Added support for theme developers who would like to integreate BWP Minify into their themes

Added a new hook added for min path.

Added new hooks to allow theme developers to only minify certain media files (see this section for more details).

Some bug fixes.

A lot of improvements have been made to catch styles and scripts printed using wp_print_scripts and wp_print_styles.

The base (b) parameter has been removed from the minify string to add support for non-standard WordPress installation (wp-content has been moved or renamed.) Thanks to Lee Powell for bug reports and patches!

Fixed a bug that makes BWP Minify fail to determine the cache directory in a sub-folder installation of Multi-site.

Fixed a possible incompatibility issue with Easy Fancybox, thanks to Bob for reporting!