This plugin includes options for developers and advanced users, however the default settings should work just fine for most sites. Kindly read our faqs about possible issues with you theme or specific plugins.
I can offer you aditional
custom made optimization on top of this plugin. If you would like to hire me, please visit my profile links for further information.
- Merge JS and CSS files into groups to reduce the number of HTTP requests
- Google Fonts merging, inlining and optimization
- Handles scripts loaded both in the header & footer separately
- Keeps the order of the scripts even if you exclude some files from minification
- Supports localized scripts (https://codex.wordpress.org/Function_Reference/wp_localize_script)
- Minifies CSS and JS with PHP Minify only, no third party software or libraries needed.
- Creates static cache files in the uploads directory.
- Preserves your original files, by duplicating and copying those files to the uploads directory
- View the status and detailed logs on the WordPress admin page.
- Option to Minify HTML, remove extra info from the header and other optimizations.
- Ability to turn off minification for JS, CSS or HTML (purge the cache to see it)
- Ability to turn off CSS or JS merging completely (so you can debug which section causes conflicts and exclude the offending files)
- Support for conditional scripts and styles, as well as inlined code that depends on the handles
- Support for multisite installations (each site has its own settings)
- Support for gzip_static on Nginx
- Support for preconnect and preload headers
- CDN option, to rewrite all static assets inside the JS or CSS files
- WP CLI support to check stats and purge the cache
- Auto purging of cache files for W3 Total Cache, WP Supercache, WP Rocket, Cachify, Comet Cache, Zen Cache, LiteSpeed Cache, Nginx Cache (by Till Krüss ), SG Optimizer, HyperCache, Cache Enabler, Breeze (Cloudways), Godaddy Managed WordPress Hosting and WP Engine (read the FAQs)
- and some more...
- Purge all caches:
wp fvm purge
- Purge all caches on a network site:
wp --url=blog.example.com fvm purge
- Purge all caches on the entire network (linux):
wp site list --field=url | xargs -n1 -I % wp --url=% fvm purge
- Get cache size:
wp fvm stats
- Get cache size on a network site:
wp --url=blog.example.com fvm stats
- Get cache size on each site (linux):
wp site list --field=url | xargs -n1 -I % wp --url=% fvm stats
- Compatible with Nginx, HHVM and PHP 7
- Minimum requirements are PHP 5.5 and WP 4.4, from version 1.4.0 onwards
Can I update plugins and themes after installing FVM?
FVM doesn't touch your original files. It copies those files to the cache directory, minifies that copy and merges them together under a different name. If you install new plugins, change themes or do plugin updates, FVM will purge its cache as well as some of the most popular cache plugins.
After installing, why did my site feels slow to load?
Please see the question below.
Why are there lots of JS and CSS files listed on the status page and why is the cache directory taking so much space?
How can I exclude certain assets?
Each line on the ignore list will try to match a substring against all CSS or JS files, for example
//yoursite.com/wp-content/plugins/some-plugin/js/ will ignore all files inside that directory. You can also shorten the URL like
/some-plugin/js/ and then it will match any css or js URL that has
/some-plugin/js/ on the path. Obviously, doing
/js/ would match any files inside any "/js/" directory and in any location, so to avoid unexpected situations please always use the longest, most specific path you can use. There is no need to use asterisks or regex code (it won't work).
Why is the ignore list not working?
The ignore list "is" working, just try to use partial paths (see previous faq) and use relative urls only without any query vars.
Is it compatible with other caching plugins?
Do you recommend a specific Cache Plugin?
Currently we recommend the "Cache Enabler" plugin, for it's simplicity, compatibility with most systems and performance. Alternatively, W3 Total Cache is a great choice as well.
Is it resource intensive, or will it use too much CPU on my shared hosting plan?
Unless you are not excluding dynamic CSS files that change the url in every pageload, its not heavy at all. On the first run, each single file is minified into an intermediate cache. When a new group of CSS/JS files is found on a new page, it reuses those files and merges them into a new static cache file. All pages that request the same group of CSS or JS files will also make use of that file, thus regeneration only happens once. In addition, gz and br files will be pre-compressed (if supported).
How do I use the pre-compressed files with gzip_static or brotli_static on Nginx?
When we merge and minify the css and js files, we also create a
.gz file to be used with
gzip_static on Nginx. You need to enable this feature on your Nginx configuration file if you want to make use of it. Likewise, if you have Nginx compiled with brotli and have enabled the php-ext-brotli extension for PHP, you can enable the brotli_static option and FVM will also generate .br files for you 🙂
Is it compatible with multisites?
Yes, it generates a new cache file for every different set of JS and CSS requirements it finds, but you must enable and configure FVM settings for each site in your network separatly (no global settings for all sites).
Is it compatible with AdSense and other ad networks?
If you are just inserting ads on your pages, yes. If you are using a custom script to inject those ads, please double check if it works.
After installing, why are some images, sections, sliders, galleries, menus (etc) not working?
a) You cannot do double minification, so make sure you have disabled any features on your theme or other plugins that perform minification of css, html and js files.
d) Sometimes a plugin conflicts with another when merged (look at google chrome console log for hints). Try to disable CSS processing first and see if it works. Disable JS processing second and see if it works. Try to disable HTML minification last and see if it works. If one of those work, you know there is a conflict when merging/minifying.
e) If you have a conflict, try to add each CSS and each JS file to the ignore list one by one, until you find the one that causes the conflict. If you have no idea of which files to add, check the log file on the "status page" for a list of files being merged into each generated file.
f) If you coded some inline JS code that depends on a JS file being loaded before it's execution (render blocking), try to save that code into an external file and enqueue it as a dependency. It will be merged together and run after the other file, thus no longer being "undefined".
Why are some of the CSS and JS files not being merged?
Can I merge files from other domains?
Yes and no. You can for example, merge js files such as jQuery if they are loading from a CDN and it will work, because it doesn't matter where those files are being served from. However, stuff like Facebook and other social media widgets, as well as tracking codes, widgets and so on, cannot usually be merged and cached locally as they may load something different on every pageload, or anytime they change something. Ads and widgets make your site slow, so make sure you only use the minimum necessary plugins and widgets.
How to undo all changes done by the plugin?
The plugin itself does not do any "changes" to your site and all original files are untouched. It intercepts the enqueued CSS and JS files just before printing your HTML, copies them and enqueues the newly optimized cached version of those files to the frontend. As with any plugin... simply disable or uninstall the plugin, purge all caches you may have in use (plugins, server, cloudflare, etc.) and the site will go back to what it was before installing it. The plugin does not delete anything from the database or modify any of your files.
I have disabled or deleted the plugin but my design is still broken!
Some "cheap" (or sometimes expensive) "optimized" hosting providers, implement a (misconfigured) aggressive cache on their servers that caches PHP code execution and PHP files. I've seen people completely deleting all WordPress files from their host via SFTP/FTP and the website kept working fine for hours. Furthermore, very often they rate limit your cache purge requests... so if you delete FVM and are still seeing references to FVM files on the "view-source:https://example.com" please be patient and contact your web hosting to purge all caches. Providers known to have this issue are some plans on hostgator and iPage (please report others if you find them).
Why is my Visual Composer or Page Editor not working?
Some plugins and themes need to edit the layout and styles on the frontend. If you have trouble with page editors, please enable the "Fix Page Editors" option on FVM and purge your caches. Note: You will only see the FVM minification working when you're logged out or using another browser after this setting.
What are the recommended cloudflare settings for this plugin?
How can I load CSS async?
You are probably a developer if you are trying this. The answer is: make sure FVM is only generating 1 CSS file, because "async" means multiple files will load out of order (however CSS needs order most of the times). If FVM is generating more than 1 CSS file per mediatype, try to manually dequeue some of the CSS files that are breaking the series on FVM (such as external enqueued files), or add their domain to the settings to be merged together. Please note... this is an advanced option for skilled developers. Do not try to fiddle with these settings if you are not one, as it will almost certainly break your site layout and functionality.
I have a complaint or I need support right now.
Before getting angry because you have no answer within a few hours (even with paid plugins, sometimes it takes weeks...), please be informed about how wordpress.org and the plugins directory work. The plugins directory is an open source, free service where developers and programmers contribute (on their free time) with plugins that can be downloaded and installed by anyone "at their own risk" and are all released under the GPL license. While all plugins have to be approved and reviewed by the WordPress team before being published (for dangerous code, spam, etc.) this does not change the license or add any warranty. All plugins are provided as they are, free of charge and should be used at your own risk (so you should make backups before installing any plugin or performing updates) and it is your sole responsibility if you break your site after installing a plugin from the plugins directory. For a full version of the license, please read: https://wordpress.org/about/gpl/
Why haven't you replied to my topic on the support forum yet?
Support is provided by plugin authors on their free time and without warranty of a reply, so you can experience different levels of support level from plugin to plugin. As the author of this plugin I strive to provide support on a daily basis and I can take a look and help you with some issues related with my plugin, but please note that this is done out of my goodwill and in no way I have any legal or moral obligation for doing this. Sometimes I am extremely busy and may take a few days to reply, but I will always reply.
But I really need fast support right now, is there any other way?
I am also available for hiring if you need custom-made speed optimizations. After you have installed the plugin, check the "Help" tab for contact information, or check my profile links here on WordPress.
Where can I report bugs?
You can get support on the official WordPress plugin page at https://wordpress.org/support/plugin/fast-velocity-minify Alternatively, you can reach me via info (at) fastvelocity.com for security or other vulnerabilities.
How can I donate to the plugin author?
If you would like to donate any amount to the plugin author (thank you in advance), you can do it via PayPal at https://goo.gl/vpLrSV
- some score fixes when deferring to pagespeed is enabled
- custom cache path permissions fix (thanks to @fariazz)
- header preload fixes (thanks to @vandreev)
- added cache purging support for the swift cache plugin
- changed cache directory to the uploads directory for compatibility reasons
- better cache purging checks
- cache purging bug fixes
- php notice fixes
- fixed cache purging on Hyper Cache plugin
- removed support for WPFC (plugin author implemented a notice stating that FVM is incompatible with WPFC)
- improved the filtering engine for pagespeed insights on desktop
- fixed subdirectories permissions
- fixed another minor PHP notice
- fixed a PHP notice on urls with query strings that include arrays on keys or values
- fixed compatibility with the latest elementor plugin
- fixed adding duplicate cron jobs + existing duplicate cronjobs cleanup
- fixed duplicate "cache/cache" directory path
- changed the minimum PHP requirements to PHP 5.5
- fixed cache purging with the hypercache plugin
- fixed a bug with inline scripts and styles not showing up if there is no url for the enqueued handle
- changed the cache directory from the wp-content/uploads to wp-content/cache
- improved compatibility with page cache plugins and servers (purging FVM without purging the page cache should be fine now)
- added a daily cronjob, to delete public invalid cache files that are older than 3 months (your page cache should expire before this)
- fixed some PHP notices, when wordpress fails to download a missing js/css file
- minor bug fix with the defer for pagespeed option
- reverted back the css merging method to version 2.5.2 due to some compatibility issues
- fixed some php notices
- disabled FVM on amp pages
- expected to be the last update on the 2.x branch, before 3.0 major release
- fixed the dynamic urls being forced as http://
- fixed the inlined styles being stripped when the inline all CSS option is enabled
- added option to disable merging of inlined css code (for when you have dynamic inline css code)
- other minor bug fixes
- css merging bug fixes
- fixed inlined css code being minified, even when minification is off
- compatibility and performance improvements for the CSS merging and inlining functionality
- removed CURL as a fallback method (CURL is already a fallback on the WP HTTP API) as per WP recommendation
- fixed a query monitor notice about mkdir
- removed some legacy code + some minor performance improvements on the code
- improvement for the defer for pagespeed option and ignore list
- improvement for the loadCSS functionality
- improvements for merging the google fonts option
- minor bug fix related to the font awesome option
- added cache purging support to Breeze (Cloudways)
- bug fixes with the google fonts merging option
- better default settings
- improved the google fonts merging to only allow existing google fonts (no more google fonts 404 errors due to the merging of the fonts)
- downgraded PHP Minify to version 1.3.60 due to someone reporting a server error with the new version
- changed the file permissions for the generated cache directory and files, to match the uploads directory
- added some extra checks for when PHP is running in safe mode
- added better default options after new install
- added option to preserve FVM settings on deactivation
- added an HTML comment to the frontend with the path and notification, when FVM cannot generate the cache files (ie: wrong file permissions)
- added a notification on wp-admin when FVM cannot generate the cache files due to wrong permissions
- added an option to force "chmod 0777" on FVM cache files, to avoid errors on servers that need more than "chmod 0755"
- improved the google fonts merging option when the enqueue is faulty (ie: incomplete google font urls )
- fixed the cache purge notifications not showing on wp-admin
- fixed a bug that could cause an error 500 if an enqueued CSS or JS file was not found
- added brotli_static support, if you have the php-ext-brotli extension installed - https://github.com/kjdev/php-ext-brotli
- fixed a bug, where it may show a warning during cache purge on wp-admin
- exclude footer FVM generated files from the HTTP header preload option (footer files are not in the critical path)
- added option to inline CSS in the footer, while still preserving the merged file in the header
- improvements for the google fonts merging option
- fixed double notification, when purging caches without a cache plugin
- added font-display, to ensure text remains visible during webfont load for inlined google fonts and font-awesome
- added automatic removal of "source mappings" from JS files during merging or minification
- added font awesome async and exclusion from PSI options, as well as merging and inlining when the url matches "font-awesome" (ie: cdnjs)
- added automatically inline of small CSS code (up to 20KB) for any FVM CSS files in the footer (requests reduction)
- added automatically inline of small CSS code (up to 20KB) for any FVM CSS files in the header, which are not of mediatype "all"
- improved the cache purge button (no more redirect from frontend to backend)
- updated PHP Minify and Path Converter from master
- bug fixes related to "Exclude JS files from PSI" option
- fixed a bug with the "Exclude JS files in the ignore list from PSI" option (it wasn't excluding properly)
- improved functionality with the "Exclude CSS files from PSI" option (now works with both inline and link stylesheets)
- added an option to automatically preload the CSS and JS files generated by FVM (beware that some server caches like Pantheon may push old css and js files even after purging caches on FVM)
- better FVM default settings
- bug fixes related to the inline css option
- changed a few options and added better descriptions to the admin options
- there was an error on my end while pushing 2.3.8... this is a version bump
- removed the dynamic protocol in favour of auto detecting HTTP(s)
- fixed a bug where some CSS files were being removed with the latest CSS inline method
- fixed a bug where the wrong file path was being generated for fonts and some static assets (when the plugin or theme, uses relative paths and the Inline CSS option is enabled)
- bug fixes and performance improvements
- changed a few "options" location to other tabs
- changed the "Inline CSS" method to inline each file right separatly, instead of merging it and then inline it (also improves compatibility)
- added option to exclude JS and CSS files from PSI separatly (will load them Async, so make sure to read the instructions for each)
- added a dedicated Critical Path CSS for "is_front_page" (more conditionals on the roadmap)
- renamed some labels to be more explicit regardless of what they do
- added better header preloader and preconnect headers for css and js files
- added support to automatically purge the cache enabler plugin
- added option to reload the cache, while preserving the old static files
- added better default options after first install
- added and reorganized some options
- added a new developers tab
- removed the YUI compressor option (defaults to PHP Minify)
- readme and screenshots update
- tested up to WP 5.0 tag
- added thinkwithgoogle support for the defer for insights option
- added HyperCache support, thanks to @erich_k4wp
- added suport for wp_add_inline_script, thanks to @yuriipavlov
- fixed a bug where some inlined css was missing if not attached to a parent css file
- the ignore list now also supports CSS handle names (no JS yet)
- updated PHP Minify from master on github
- improved performance for gtmetrix tests
- bug fix
- added a check to prevent creating an empty js or css file
- added an option to force the CDN option when using the defer for insights option
- removed the alternative HTML minification method
- minor performance and bug fixes
- added some compatibility fixes when merging and minifying JS files
- added an option to enable an "FVM Purge" button on the admin bar
- moved all large transients (cached css or js code) to temporary disk files to reduce the database load
- bug fixes and performance tweaks for the "fix page editors" option
- added wp cli support for purge cache (usage: wp fvm purge)
- added wp cli support for getting the cache size (usage: wp fvm stats)
- fixed several bugs related to notices, css minification and file paths
- added more pcre.backtrack_limit and pcre.recursion_limit to avoid blank pages on some servers
- added new option to defer the ignore list for pagespeed
- rollback to 2.2.6 + bugfixes
- fixed a bug with the blacklist functionality
- replaced PHP Minify with JSMin as the default JS minification
- replaced PHP Minify with CSSTidy as the default CSS minification
- replaced PHP Minify with Minify HTML as the default HTML minification
- moved the intermediary cache from transients to disk files
- fixed a bug with html minification on some files that should not be minified
- fixed a bug with the defer for pagespeed insights
- updated the default blacklist (delete all entries and save again, to restore)
- fixed a fatal error reported on the support forum
- added custom cache directory and url support
- cleaned up some old unused code
- updated to the latest PHP Minify version
- added better descriptions and labels for some options
- added auto exclusion for js and css files when defer for pagespeed is enabled
- added robots.txt and ajax requests to the exclusion list
- added some cdn fixes
- added a new Pro tab
- added a global critical path css section
- added an option to dequeue all css files
- added an option to load CSS Async with LoadCSS (experimental)
- added an option to merge external resources together
- added the possibility to manage the default ignore list (reported files that cause conflicts when merged)
- added the possibility to manage the blacklist (files that cannot be merged with normal files)
- added better descriptions and labels for some options
- fixed the current cdn option box
- fixed some other minor bugs and notices
- added option to remove all enqueued google fonts (so you can use your own CSS @fontfaces manually)
- added font hinting for the "Inline Google Fonts CSS" option, so it looks better on Windows
- added unicode support to the alternative html minification option
- improved some options description
- fixed some debug notices
- fixed the alternative html minification option
- fixed a development bug
- fixed the html minification not working
- added support for the cdn enabler plugin (force http or https method)
- improved html minification speed and response time to the first byte
- fixed a random bug with the html minification library on large html pages (white pages)
- added support for the "Nginx Cache" plugin purge, by Till Krüss
- fixed a php notice in debug mode
- children styles (added with wp_add_inline_style) are now kept in order and merged together in place
- added faqs for possible "visual composer" issues
- css bug fixes and performance improvements
- added support for auto purging on WP Engine
- added compatibility with WP Engine.com and other providers that use a CNAME with their own subdomain
- updated PHP Minify for better compatibility
- added an alternative mode for html minification (because PHP Minify sometimes breaks things)
- css bug fixes and performance improvements
- fixed another error notice when debug mode is on
- fixed an error notice
- some performance improvements
- several bug and compatibility fixes
- fixed a notice alert on php for undefined function
- added support for auto purging of LiteSpeed Cache
- added support for auto purging on Godaddy Managed WordPress Hosting
- added the ie only blacklist, wich doesn't split merged files anymore, like the ignore list does
- added auto updates for the default ignore list and blacklist from our api once every 24 hours
- added cdn rewrite support for generated css and js files only
- removed url protocol rewrites and set default to dynamic "//" protocols
- updated the faqs
- added a "Troubleshooting" option to fix frontend editors for admin and editor level users
- updated the faqs
- fixed preserving the SVG namespace definition "http://www.w3.org/2000/svg" used on Bootstrap 4
- added some exclusions for Thrive and Visual Composer frontend preview and editors
- improved compatibility with Windows operating systems
- fixed an "undefined" notice
- improved compatibility on JS merging and minification
- fixed missing file that caused some errors on new installs
- moved the css and js merging base code back to 1.4.3 because it was better for compatibility
- removed the font awesome optimization tweaks because people have multiple versions and requirements (but duplicate css and js files are always removed)
- added all usable improvements and features up to 1.5.2, except for the "Defer CSS" and "Critical Path" features (will consider for the future)
- added info to the FAQ's about our internal blacklist for known CSS or JS files that are always ignored by the plugin
- changed the way CSS and JS files are fetched and merged to make use of the new improvements that were supposed to be on 1.4.4+
- changed the advanced settings tab back to the settings page for quicker selection of options by the advanced users
- changed the cache purging option to also delete our plugin transients via the API, rather than just let them expire
- changed the "Inline all CSS" option into header and footer separately
- Initial Release
- Upload the plugin folder to the
/wp-content/plugins/directory or upload the zip within WordPress
- Activate the plugin through the
Pluginsmenu in WordPress
- Configure the options under:
Settings > Fast Velocity Minifyand that's it.
The Status and Logs page.
The Settings page.
The Pro settings.
The Developers settings.