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.



This plugin will combine all inline and external CSS in the order found on the page and save it to WP-Rocket’s cache folder as a new file. Files with media attributes are wrapped in @media selectors during processing. Async is powered by

If you are looking for a professional team to get your WordPress site to run faster, check us out for our speed optimization, google my business, seo and local seo services at Rank Grow Digital

Filters rocket_async_css_process_style and rocket_async_css_process_file can be used to selectively exclude any inline CSS or external CSS from minify and async loading.

Examples are:

function exclude_css($skip, $css){
    if ( false !== strpos( $css, 'something' ) ) {
            return false;

    return $skip;
add_filter('rocket_async_css_process_style','exclude_css', 10, 2);


function exclude_file($skip, $url){
    if ( 'some url' == $url ) {
            return false;

    return $skip;
add_filter('rocket_async_css_process_style','exclude_file', 10, 2);


This section describes how to install the plugin and get it working.

  1. Upload the plugin files to the /wp-content/plugins/rocket-async-css directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. View HTML source, and test it out!


ઓક્ટોબર 16, 2016 1 reply
The plugin removes the render blocking css for desktop, but pagespeed still shows render blocking css for mobile. Also, as css is async, this plugin really needs option to insert critical css style so page load doesn't look odd. The author's other plugin for js successfully removes render blocking for both desktop and mobile.
4 સમીક્ષાઓ વાંચો

ફાળો આપનાર & ડેવલપર્સ

આ ઓપન સોર્સ સોફ્ટવેર છે. નીચેના લોકો એ આ પ્લગિન માટે ફાળો આપ્યો છે.

ફાળો આપનારા


  • Bug: Handle edge case where file does not have an extension when fetching remote files
  • Bug: If wpautop is hooked, call it early to prevent DOMDocument from nuking newlines in ResponsiveImages module
  • Enhancement: Optimize loading of picturefill by doing feature detection to conditionally load script
  • Enhancement: Add support for purging cache via cron, using rocket_aync_css_background_cache_purge_item_threshold filter, and preload cache if enabled after
  • Enhancement: Add object cache support to fetching the attachment ID’s for a url to reduce unneeded db strain, in ResponsiveImages module
  • Enhancement: Use the remote server to detect the mime type and map it to our registered types if available when fetching files
  • Enhancement: Add filter, rocket_async_css_do_download_remote_file, to allow skipping fetching a remote file
  • Compatibility: Add Visual Composer compatibility

  • Bug: Do additional cleanup on font processing to prevent bad syntax
  • Bug: Don’t process AJAX JSON requests
  • Bug: Exclude ResponsiveImage processing from AMP
  • Enhancement: Centralize multibyte encoding for entities into the DOMDocument class so that style tags do not get processed

  • Bug: Ensure admin pages, xml requests, xmlrpc requests, feed requests, and JSON requests are ignmored by the responsive images module
  • Bug: Encode both scripts and styles in DOM processing due to further edge cases found
  • Enhancement: Simplify lazy load font parsing and catch edge cases with embedded fonts
  • Enhancement: Ensure wp-rocket preload only runs on cron by conditionally deferring it
  • Compatibility: Add compatibility with genesis theme
  • Misc: Defer init checks for responsive Image module since the request needs to be parsed

  • Bug: Don’t do any image processing in admin
  • Bug: Ensure the CDN url is not hashed when caching local files
  • Feature: Add integration with Elementor to support WebP
  • Feature: Add integration with WebPExpress to support WebP in css processing
  • Feature: Add font display support using a filter
  • Feature: Add font-display support for Elementor “eicon” font
  • Feature: Add font-display support for FontAwesome
  • Feature: Add font-display support for GoogleFonts
  • Feature: Add font-display support for Layers icon font
  • Feature: Add font-display support for IcoMoons font
  • Feature: Add new pre-post-processing step to scan and storte a liost of all referenced assets to prioritize local versions of files over remote ones and reduce the chance of duplicates loading
  • Enhancement: Add support for modifying the minify cache key
  • Enhancement: Add support for WebP in the minify cache
  • Enhancement: Ensure image src/data-src removed if srcset exists
  • Enhancement: Major refactor of CSS processing logic using a callback approach and separating to a dedicated process_css method
  • Enhancement: Ensure comments are stripped out from CSS
  • Enhancement: Allow caching read/save to be bypassed
  • Enhancement: Rewrite Responsive Images module to use DOMDocument vs string/regex parsing to improve memory performance
  • Enhancement: Cache fetch calls to reduce network processing
  • Enhancement: Add compatibility with Essential Addons for Elementor
  • Enhancement: Add cache compatibility with Elementor to ensure CSS is cleared on site purge
  • Enhancement: Have the wp-rocket preload bot run on a sitewide purge
  • Compatibility: Add compatibility with Elementor image carousel to render responsive images
  • Compatibility: Add Divi compatibility to disable CSS concatenation
  • Compatibility: Add integration with Rank Math SEO to not process the sitemap

  • Misc: Fix missing changes from release

  • Bug: Limit query in responsive images module to 1 item and disable sorting
  • Compatibility: Add compatibility with foundationpress theme

  • Bug: Switch back to using comments for IE conditionals since they are re-processed before the JS plugin can HTML minify
  • Compatibility: Change file purge filter for compatibility with wp-rocket 3.2

  • Bug: Fix bug that avada setting media_queries_async is tested as a string 0 specifically and not boolean false
  • Compatibility: WP Rocket update changed when IE conditions are processed and are done unconditionally, so refactoring needed to prevent issues. Side effect was that the title, meta, and link tags could be put in the body causing serious SEO problems.

  • Bug: Handle case where CDN domain may be just a domain and not a url
  • Compatibility: Add compatibility with wp-rocket 3.1 due to JS minify class change
  • Compatibility: Force disable Avada async css option

  • Bug: Various bug fixes in responsive image module including better handling of quotes
  • Bug: Fix essential grid state defaulting to true
  • Compatibility: Disable lazy loading completely for all revolution slider images
  • Compatibility: Fix quotes in responsive image module due to bug in a3 lazy load

  • Bug: Don’t use PHP_INT_MAX on rocket_buffer
  • Enhancement: Major refactor/rewrite of the responsive image class with many bug fixes

  • Enhancement: Ensure get_rocket_cdn_url uses all css/js zones as well as the default all
  • Enhancement: Major refactor/rewrite of the responsive image class with many bug fixes

  • Enhancement: Ensure get_rocket_cdn_url uses all css/js zones as well as the default all
  • Enhancement: Major refactor/rewrite of the responsive image class with many bug fixes

  • Enhancement: Add rocket_async_css_process_responsive_image filter to process image before going to lazy load if enabled
  • Integration: AAdd EssentialGrid integration module to prevent lazy load on images and force cdn’ifying the ajax response HTML

  • Don’t check libxml version on body fix

  • Fix bug with plugin startup that could cause a crash

  • Update plugin framework

  • Prevent crash from undefined is_plugin_active in some situations


This is considered a MAJOR release due to the amount of effort that has been invested since the last release in 2017

  • BUGS!: Too many bug fixes to give out in detail. It would be ideal to review git commits in this case

  • Integration: Add AvadaTheme integration to work around css bug

  • Integration: Add Google Web Fonts integration
  • Integration: Add integration with Flatsome theme
  • Integration: Add integration with wonder plugin carousel
  • Integration: Add integration with max mega menu
  • Integration: Add integration with divi builder
  • Integration: Add integration with divi booster
  • Integration: Add compatibility with The 7 theme
  • Feature: Add rocket_async_css_do_blocking filter to force the CSS to output in normal blocking mode for odd edge case exceptions
  • Enhancement: Add a footer JS to signal that js is fully loaded
  • Enhancement: Add rocket_async_css_do_minify filter for css item to skip minify if it is problematic
  • Enhancement: Run lazyload on every individual image and not the whole document to prevent altering javascript or other markup that doesn’t need to be touched
  • Enhancement: Refactor responsive images integration to look up based on GUID and not do a post meta query for performance
  • Enhancement: Add filter, rocket_async_css_lazy_load_responsive_image, to determine if responsive image should be lazy loaded
  • Compatibility: Add workaround technique for processing inline javascript that has html
  • Compatibility: Don’t lazyload images in revolution slider
  • Compatibility: Add woocommerce integration to fix cache issues
  • Compatibility: Fix compatibility with wp-rocket causing fatal errors


This is a MAJOR release and over 50% of the code is rewritten. While it has been extensively tested, there may still be bugs! Please test in a development site before deploying! Due to the amount of work, only a summary of this version will be detailed below.

  • Major rewrite using new composer based framework.
  • Process any remote or local import
  • Download any remote file referenced to the minify folder. This fixes google fonts too being remotely requested!
  • Reduce files generated by minify
  • Add integration with Juipter Theme
  • Add integration with LaterSlider
  • Add integration with Meta Slider
  • Add integration with Revolution Slider
  • Add integration with WP Critical CSS
  • Add responsive images and lazy load support. This fixes almost ANY image that was not created with srcset that its your media. If a wordpress image size does not match though, Simple Image Sizes plugin is recommended.
  • Many other changes


  • Rename instance function wrapper to not conflict with wp-rocket async css
  • Ensure local files are not url encoded


  • Disable cache busting in wp-rocket


  • Improve UTF-8 character handling in the-preloader integration
  • Simulate a window resize after preloader div is gone as well as before in the-preloader integration
  • Remove stray wp_cache_flush


  • Improve UTF-8 character handling


  • Remove use of user id in cache tree


  • Use deactivated_plugin hook on deactivation
  • Rebuild cache system without using SQL


  • Ensure home uses the active URL scheme


  • Add compatibility hack for older libxml


  • Add compatibility with avada theme and revslider to act the same as the revslider shortcode hack
  • Split remote minification to a public function so that it can be called by other plugins and add filter rocket_async_css_minify_remote_file


  • Fix transient timeout names in purge methods


  • Bugfix purging post transients
  • Add purging for home, terms, and generic urls


  • Make post_cache user specific
  • Used wrong post cache ID prefix


  • Ensure url scheme is set correctly when converting from a CDN domain


  • Disable minify on AMP pages
  • Move preloader init to new wp_action method

  • Missed non-PHP 5.3 code


  • Ensure PHP 5.3 compatibility


  • Prevent false positives on exclude_wpadminbar by using a md5 hash


  • Use rocket_remove_url_protocol and rocket_add_url_protocol on prependRelativePath for remote css
  • Ensure no query exists for rebuilding url


  • Use require_once on http_build_url polyfill
  • Always create $url_parts and update $href_host to $url_parts[‘host’]
  • Prepend the directory url to correct referenced assets for remote CSS


  • Fix bug caused in 0.4.2 due to wrong variable


  • If we can’t get the head element, just stop


  • Tags should always be removed, not just when the cache is empty


  • Inject javascript hack to trigger a window resize event on load to fix any layout issues due to the-preloader


  • Near complete refactor of plugin structure to remove un-needed code
  • Add new minify cache system to reduce computation time required to minify a page

Notice: This new cache system could cause unknown issues. While it has been tested, not every situation can be accounted for. Contact me if you hit a problem.

Notice: Cache is stored in transients, so only a normal wp-rocket purge will clear everything


  • Bug fix revolution slider compatibility


  • Add compatibility support for revolution slider


  • Check for relative URL’s


  • Ensure normal array styles are used
  • Pass null instead of stdClass to WP_Filesystem_Direct
  • Recursively process CSS imports with regex


  • Check for WPML and temporarily remove its home_url hook

  • Use createTextNode as nodeValue encodes input


  • Use nodeValue due to php bug in < 5.6 that causes it to not actually save/write it


  • Fix argument order of rocket_async_css_process_file filter

  • Goofed 0.3.5 version release


  • If any media in the list is screen or projection, set it to all


  • Set generated filename to a global variable $rocket_async_css_file


  • Missing filter to disable WP-Rockets css minify


  • Search for stylesheets inside style tags due to possible malform from wprocket and add to tags list


  • New minify method to combine to 1 file by wrapping specific media selectors in a @media block
  • Set crossorigin attribute for CORS friendly css if on CDN


  • Revert to using loadCSS as a inline script and dump the external dependencies


  • Rocket_Async_Css should not be ran until plugins_loaded


  • Remove duplicate filter for google fonts that could break themes
  • Skip css media group if css is empty


Changes are code breaking to other plugins using Rocket ASYNC CSS!

  • Major refactoring
  • New function wrapper for singleton
  • Initialization runs on plugins_loaded after wp-rocket now (priority 11)
  • Purge cache on deactivation
  • Use constants for version and slug


  • Web fetch dynamic styles being defined as not having a CSS extension
  • Add onload attribute for supported browsers
  • Remove onload attribute since preload isn’t supported in csspreload.js
  • Use removeAttribute, don’t set to null in csspreload.js


  • Reverse the order of outputting tags so they are in the correct order
  • Reformat code


  • Initial version