We'll create fresh WordPress site with Dependency Minification installed. You have 20 minutes to test the plugin after that site we'll be deleted.
This plugin takes all scripts and stylesheets that have been added via wp_enqueue_script and wp_enqueue_style
and automatically concatenates and minifies them into logical groups. For example, scripts in the footer get grouped
together and styles with the same media (e.g. print) get minified together. Minification is done via WP-Cron in order
to prevent race conditions and to ensure that the minification process does not slow down page responses.
This is a reincarnation and rewrite of the Optimize Scripts plugin,
which this plugin now supersedes.
Features:
/_minified, which can be configured.dependency_minification_excluded filter.default_exclude_remote_dependencies option via the dependency_minification_options filter, or on a case-by-case basis via the filter previously mentioned.dependency_minification_excluded filter.cache_control_max_age_cache option.show_error_messages option is enabled; such errors are enabled by default if WP_DEBUG.cache_control_max_age_error) to prevent back-to-back crons from continually attempting to minify in perpetuity.Last-Modified and ETag responses headers and requests will honor If-None-Match and If-Modified-Since to return 304 Not Modified responses (configurable via the allow_not_modified_responses option).wp_localize_script) is also concatenated together and attached to the newly-minified script.gzip or deflate.Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.
If you are using Nginx with the default Varying Vagrant Vagrants config, you’ll want to remove css|js from this rule in nginx-wp-common.conf (or remove the rule altogether):
# Handle all static assets by serving the file directly. Add directives
# to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}