Dependency Minification
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 sources are stored in the WP Options table so no special filesystem access is required. Endpoint for minified requests is at /_minified, which can be configured. Admin page for taking inventory of minified scripts and stylesheets, with methods for expiring or purging the cached data. Dependencies which must not be minified may be excluded via the dependency_minification_excluded filter. Dependencies hosted on other domains are by default excluded, but this behavior can be changed by filtering the default_exclude_remote_dependencies option via the dependency_minification_options filter, or on a case-by-case basis via the filter previously mentioned. By default excludes external scripts from being concatenated and minified, but they can be opted in via the dependency_minification_excluded filter. The length of time that a minified source is cached defaults to 1 month, but can be configured via the cache_control_max_age_cache option. If a minified source is not available yet, the page source will note that the dependency minification process is pending. Any errors that occur during minification will be shown on the frontend in comments if the show_error_messages option is enabled; such errors are enabled by default if WP_DEBUG. If the minification process errors out, the original unminified sources are served and the error is cached for 1 hour (by default, configured via cache_control_max_age_error) to prevent back-to-back crons from continually attempting to minify in perpetuity. Cached minified sources are served with 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). Data attached to scripts (e.g. via wp_localize_script) is also concatenated together and attached to the newly-minified script. WP-Cron is utilized to initiate the minification process in order to prevent race conditions, and to ensure that page responses aren’t slowed down. Stale minified scripts and stylesheets remain until replaced by refreshed ones; this ensures that full-page caches which reference stale minified sources won’t result in any 404s. Can serve compressed responses with gzip or deflate. Transforms relatives paths in stylesheets (e.g. background-images) to absolute ones, so that they don’t 404. 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; }
Top keywords
- minified12×2.21%
- minification9×1.65%
- scripts7×1.29%
- default6×1.10%
- responses6×1.10%
- wp5×0.92%
- cached4×0.74%
- dependency4×0.74%
- dependency minification4×0.74%
- error4×0.74%
- excluded4×0.74%
- filter4×0.74%
LiteSpeed Cache
LiteSpeed Cache for WordPress (LSCWP) is an all-in-one site acceleration plugin, featuring an exclusive server-level cache and a collection of optimization features. LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO. LiteSpeed Cache for WordPress is compatible with ClassicPress. Requirements General Features may be used by anyone with any web server (LiteSpeed, Apache, NGINX, etc.). LiteSpeed Exclusive Features require one of the following: OpenLiteSpeed, commercial LiteSpeed products, LiteSpeed-powered hosting, or QUIC.cloud CDN. Why? Plugin Features General Features Free QUIC.cloud CDN Cache Object Cache (Memcached/LSMCD/Redis) Support+ Image Optimization (Lossless/Lossy) Minify CSS, JavaScript, and HTML Minify inline & external CSS/JS Combine CSS/JS Automatically generate Critical CSS Lazy-load images/iframes Responsive Image Placeholders Multiple CDN Support+ Load CSS Asynchronously Defer/delay JS loading Browser Cache Support+ Database Cleaner and Optimizer PageSpeed score (including Core Web Vitals) optimization OPcode Cache Support+ HTTP/2 Push for CSS/JS (on web servers that support it) DNS Prefetch Cloudflare API Single Site and Multisite (Network) support Import/Export settings Attractive, easy-to-understand interface AVIF/WebP image format support Heartbeat control + This service is not provided by the LSCache plugin, nor is it guaranteed to be installed by your service provider. However, the plugin is compatible with the service if it is in use on your site. LiteSpeed Exclusive Features Automatic page caching to greatly improve site performance Automatic purge of related pages based on certain events Private cache for logged-in users Caching of WordPress REST API calls Separate caching of desktop and mobile views Ability to schedule purge for specified URLs WooCommerce and bbPress support WordPress CLI commands API system for easy cache integration Exclude from cache by URI, Category, Tag, Cookie, User Agent Smart preload crawler with support for SEO-friendly sitemap Multiple crawlers for cache varies HTTP/2 support HTTP/3 & QUIC support ESI (Edge Side Includes) support* Widgets and Shortcodes as ESI blocks* (requires Classic Widgets plugin for WP 5.8+) * Feature not available in OpenLiteSpeed LSCWP Resources Join our Slack community to connect with other LiteSpeed users. Ask a question on our support forum. View detailed documentation. Read about LSCWP and WordPress on our blog. Help translate LSCWP. Contribute to the LSCWP GitHub repo. Third Party Compatibility The vast majority of plugins and themes are compatible with LSCache. Our API is available for those that are not. Use the API to customize smart purging, customize cache rules, create cache varies, and make WP nonce cacheable, among other things. Privacy This plugin includes some suggested text that you can add to your site’s Privacy Policy via the Guide in the WordPress Privacy settings. For your own information: LiteSpeed Cache for WordPress potentially stores a duplicate copy of every web page on display on your site. The pages are stored locally on the system where LiteSpeed server software is installed and are not transferred to or accessed by LiteSpeed employees in any way, except as necessary in providing routine technical support if you request it. All cache files are temporary, and may easily be purged before their natural expiration, if necessary, via a Purge All command. It is up to individual site administrators to come up with their own cache expiration rules. In addition to caching, our WordPress plugin has online features provided by QUIC.cloud for Image Optimization and Page Optimization services. When one of these optimizations is requested, data is transmitted to a remote QUIC.cloud server, processed, and then transmitted back for use on your site. QUIC.cloud keeps copies of that data for up to 7 days and then permanently deletes it. Similarly, the WordPress plugin has a Reporting feature whereby a site owner can transmit an environment report to LiteSpeed so that we may better provide technical support. None of these features collects any visitor data. Only server and site data are involved. QUIC.cloud CDN, if enabled, uses LSCache technology to access your site, and serve your content from remote global nodes. Your data is not accessed by QUIC.cloud employees in any way, except as necessary in providing maintenance or technical support. Please see the QUIC.cloud Privacy Policy for our complete Privacy/GDPR statement.