Autoptimize
Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.
Safe pick
Yes — Autoptimize is a safe, well-maintained plugin to use in 2026. It runs on 800K+ sites, is rated 4.7/5 and was last updated 10 hours ago, and scores 97/100 on our health check.
- Proven at scale on 800K+ active sites
- Loved by users — 4.7/5 from 1,428 reviews
- Actively developed — last update 10 hours ago
- Tested with the latest WordPress (7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Autoptimize stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| core web vitals | #4 |
| images | #65 |
| Optimize | #22 |
| pagespeed | #7 |
| performance | #34 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 4.7 from 1,428 reviews
About Autoptimize
From the official readme · v3.1.16Description
Autoptimize makes optimizing your site really easy. It can aggregate, minify and cache scripts and styles, injects CSS in the page head by default but can also inline critical CSS and defer the aggregated full CSS, moves and defers scripts to the footer and minifies HTML. You can optimize and lazy-load images (with support for WebP and AVIF formats), optimize Google Fonts, async non-aggregated JavaScript, remove WordPress core emoji cruft and more. As such it can improve your site’s performance even when already on HTTP/2! There is extensive API available to enable you to tailor Autoptimize to each and every site’s specific needs.
If you think performance indeed is important, you should at least consider one of the many free page caching plugins (e.g. Speed Booster pack or KeyCDN’s Cache Enabler) to complement Autoptimize or even consider Autoptimize Pro which not only has page caching but also image optimization, CDN, critical CSS and more!
Autoptimize Pro
Autoptimize Pro is a premium Power-Up, adding image optimization, CDN, page caching, automatic critical CSS rules and extra “booster” options, all in one handy subscription to make your site even faster!!Premium Support
We provide great Premium Support and Web Performance Optimization services with Accelera, check out our offering on https://accelerawp.com/!
(Speed-surfing image under creative commons by LL Twistiti)
Installation
Just install from your WordPress “Plugins > Add New” screen and all will be well. Manual installation is very straightforward as well:
- Upload the zip file and unzip it in the
/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to
Settings > Autoptimizeand enable the options you want. Generally this means “Optimize HTML/ CSS/ JavaScript”.
Frequently asked questions
What does the plugin do to help speed up my site?
It minifies all scripts and styles and configures your webserver to compresses them with good expires headers. JavaScript be default will be made non-render-blocking and CSS can be too by adding critical CSS. You can configure it to combine (aggregate) CSS & JS-files, in which case styles are moved to the page head, and scripts to the footer. It also minifies the HTML code and can also optimize images and Google Fonts, making your page really lightweight.
But I’m on HTTP/2, so I don’t need Autoptimize?
HTTP/2 is a great step forward for sure, reducing the impact of multiple requests from the same server significantly by using the same connection to perform several concurrent requests and for that reason on new installations Autoptimize will not aggregate CSS and JS files any more. That being said, concatenation of CSS/ JS can still make a lot of sense, as described in this css-tricks.com article and this blogpost from one of the Ebay engineers. The conclusion; configure, test, reconfigure, retest, tweak and look what works best in your context. Maybe it’s just HTTP/2, maybe it’s HTTP/2 +…
Will this work with my blog?
Although Autoptimize comes without any warranties, it will in general work flawlessly if you configure it correctly. See “Troubleshooting” below for info on how to configure in case of problems. If you want you can test Autoptimize on a new free dummy site, courtesy of tastewp.com.
Why is jquery.min.js not optimized when aggregating JavaScript?
Starting from AO 2.1 WordPress core’s jquery.min.js is not optimized for the simple reason a lot of popular plugins inject inline JS that is not aggregated either (due to possible cache size issues with unique code in inline JS) which relies on jquery being available, so excluding jquery.min.js ensures that most sites will work out of the box. If you want optimize jquery as well, you can remove it from the JS optimization exclusion-list (you might have to enable “also aggregate inline JS” as well or switch to “force JS in head”).
Why is Autoptimized JS render blocking?
This happens when aggregating JavaSCript and ticking the “force in head” option or when not aggregating and not deferring. Consider changing settings.
Why is the autoptimized CSS still called out as render blocking?
With the default Autoptimize configuration the CSS is linked in the head, which is a safe default but has Google PageSpeed Insights complaining. You can look into “inline all CSS” (easy) or “inline and defer CSS” (better) which are explained in this FAQ as well.
What is the use of “inline and defer CSS”?
CSS in general should go in the head of the document. Recently a.o. Google started promoting deferring non-essential CSS, while inlining those styles needed to build the page above the fold. This is especially important to render pages as quickly as possible on mobile devices. As from Autoptimize 1.9.0 this is easy; select “inline and defer CSS”, paste the block of “above the fold CSS” in the input field (text area) and you’re good to go!
But how can one find out what the “above the fold CSS” is?
There’s no easy solution for that as “above the fold” depends on where the fold is, which in turn depends on screensize. There are some tools available however, which try to identify just what is “above the fold”. This list of tools is a great starting point. The Sitelocity critical CSS generator and Jonas Ohlsson’s criticalpathcssgenerator are nice basic solutions and http://criticalcss.com/ is a premium solution by the same Jonas Ohlsson. Alternatively this bookmarklet (Chrome-only) can be helpful as well.
Or should you inline all CSS?
The short answer: probably not. Although inlining all CSS will make the CSS non-render blocking, it will result in your base HTML-page getting significantly bigger thus requiring more “roundtrip times”. Moreover when considering multiple pages being requested in a browsing session the inline CSS is sent over each time, whereas when not inlined it would be served from cache. Finally the inlined CSS will push the meta-tags in the HTML down to a position where Facebook or Whatsapp might not look for it any more, breaking e.g. thumbnails when sharing on these platforms.
My cache is getting huge, doesn’t Autoptimize purge the cache?
Autoptimize does not have its proper cache purging mechanism, as this could remove optimized CSS/JS which is still referred to in other caches, which would break your site. Moreover a fast growing cache is an indication of other problems you should avoid. Instead you can keep the cache size at an acceptable level by either: disactivating the “aggregate inline JS” and/ or “aggregate inline CSS” options excluding JS-variables (or sometimes CSS-selectors) that change on a per page (or per pageload) basis. You can read how you can do that in this blogpost. Despite above objections, there are 3rd…
“Clear cache” doesn’t seem to work?
When clicking the “Delete Cache” link in the Autoptimize dropdown in the admin toolbar, you might to get a “Your cache might not have been purged successfully”. In that case go to Autoptimizes setting page and click the “Save changes & clear cache”-button. Moreover don’t worry if your cache never is down to 0 files/ 0KB, as Autoptimize (as from version 2.2) will automatically preload the cache immediately after it has been cleared to speed further minification significantly up.
My site looks broken when I purge Autoptimize’s cache!
When clearing AO’s cache, no page cache should contain pages (HTML) that refers to the removed optimized CSS/ JS. Although for that purpose there is integration between Autoptimize and some page caches, this integration does not cover 100% of setups so you might need to purge your page cache manually.
Can I still use Cloudflare’s Rocket Loader?
Cloudflare Rocket Loader is a pretty advanced but invasive way to make JavaScript non-render-blocking, which Cloudflare still considers Beta. Sometimes Autoptimize & Rocket Loader work together, sometimes they don’t. The best approach is to disable Rocket Loader, configure Autoptimize and re-enable Rocket Loader (if you think it can help) after that and test if everything still works. At the moment (June 2017) it seems RocketLoader might break AO’s “inline & defer CSS”, which is based on Filamentgroup’s loadCSS, resulting in the deferred CSS not loading.
I tried Autoptimize but my Google Pagespeed Scored barely improved
Autoptimize is not a simple “fix my Pagespeed-problems” plugin; it “only” aggregates & minifies (local) JS & CSS and images and allows for some nice extra’s as removing Google Fonts and deferring the loading of the CSS. As such Autoptimize will allow you to improve your performance (load time measured in seconds) and will probably also help you tackle some specific Pagespeed warnings. If you want to improve further, you will probably also have to look into e.g. page caching and your webserver configuration, which will improve real performance (again, load time as measured by e.g…
What can I do with the API?
A whole lot; there are filters you can use to conditionally disable Autoptimize per request, to change the CSS- and JS-excludes, to change the limit for CSS background-images to be inlined in the CSS, to define what JS-files are moved behind the aggregated one, to change the defer-attribute on the aggregated JS script-tag, … There are examples for some filters in autoptimize_helper.php_example and in this FAQ.
How does CDN work?
Starting from version 1.7.0, CDN is activated upon entering the CDN blog root directory (e.g. http://cdn.example.net/wordpress/). If that URL is present, it will used for all Autoptimize-generated files (i.e. aggregated CSS and JS), including background-images in the CSS (when not using data-uri’s). If you want your uploaded images to be on the CDN as well, you can change the upload_url_path in your WordPress configuration (/wp-admin/options.php) to the target CDN upload directory (e.g. http://cdn.example.net/wordpress/wp-content/uploads/). Do take into consideration this only works for…
Why aren’t my fonts put on the CDN as well?
Autoptimize supports this, but it is not enabled by default because non-local fonts might require some extra configuration. But if you have your cross-origin request policy in order, you can tell Autoptimize to put your fonts on the CDN by hooking into the API, setting autoptimize_filter_css_fonts_cdn to true this way; add_filter( 'autoptimize_filter_css_fonts_cdn', '__return_true' );
I’m using Cloudflare, what should I enter as CDN root directory
Nothing, when on Cloudflare your autoptimized CSS/ JS is on the Cloudflare’s CDN automatically.
How can I force the aggregated files to be static CSS or JS instead of PHP?
If your webserver is properly configured to handle compression (gzip or deflate) and cache expiry (expires and cache-control with sufficient cacheability), you don’t need Autoptimize to handle that for you. In that case you can check the “Save aggregated script/css as static files?”-option, which will force Autoptimize to save the aggregated files as .css and .js-files (meaning no PHP is needed to serve these files). This setting is default as of Autoptimize 1.8.
How does “exclude from optimizing” work?
Both CSS and JS optimization can skip code from being aggregated and minimized by adding “identifiers” to the comma-separated exclusion list. The exact identifier string to use can be determined this way: if you want to exclude a specific file, e.g. wp-content/plugins/funkyplugin/css/style.css, you could simply exclude “funkyplugin/css/style.css” if you want to exclude all files of a specific plugin, e.g. wp-content/plugins/funkyplugin/js/*, you can exclude for example “funkyplugin/js/” or “plugins/funkyplugin” if you want to exclude inline code, you’ll have to find a specific, unique string…
Changelog
3.1.16
- Security: overall hardening of Autoptimize, e.g. replacing some regular expressions with a more modern, safer approach.
- CSS minification: fixes for problems with alpha channel of rgb()/hsl() colors (thanks to @hinnerk-a)
- Critical CSS: improvements to job queueing and settings page tweaks
- confrimed OK with WordPress 7.1
3.1.15.1
- fix for “Uncaught Error: Using $this when not in object context” when preloads are set
3.1.15
- also add fetchpriority=high to preload set on Extra tab
- improve exit survey display in RTL languages
- security enhancements for 2 authenticated stored XSS issues responsibly reported by stealhcopter and bashu
- multiple minor changes/ improvements/ bugfixes, see the GitHub commit log.
3.1.14
- improve HTML output for <link rel=”preload” images (based on report by Muhammad)
- let the 404-handler issue a 302 iso 301 HTTP response (as mentioned by thefitrv)
- small improvement in critical CSS cron job handling in case of an empty “time limit” (thanks for the help Jason)
- fix bug in “domain binding” in critical CSS advanced options (reported by Hazel)
- catch and report (exceptional) JS optimization issues causing preg_replace_callback to crash out (in case of a huge amount of JS code), thanks siliconforks
- confirmed OK with WordPress 6.9
3.1.13
- multiple minor changes/ improvements/ bugfixes, see the GitHub commit log.
3.1.12
- image optimization: improvements to the favicon regex
- javascript optimization: integrate most recent version of jsmin.php
- critical CSS: improve blocklist (url/ paths that should not be added to the job queue)
- some other minor changes/ improvements/ filters, see the GitHub commit log.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Autoptimize alternatives
All core web vitals plugins →FAQ
Autoptimize: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Sep 26, 2026
Is Autoptimize free?
Yes. Autoptimize is free to download and use from the official WordPress.org plugin directory.
Is Autoptimize safe to use in 2026?
Yes — Autoptimize is a safe, well-maintained plugin to use in 2026. It runs on 800K+ sites, is rated 4.7/5 and was last updated 10 hours ago, and scores 97/100 on our health check.
How many websites use Autoptimize?
Autoptimize is active on 800K+ WordPress websites and has been downloaded 44,266,216 times since it launched in July 2009. It was downloaded 77,630 times in the last 30 days.
Does Autoptimize work with WordPress 7.1?
Yes. The developer has tested Autoptimize up to WordPress 7.1.2, the latest release. It requires WordPress 5.3 or newer.
What PHP version does Autoptimize need?
Autoptimize requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Autoptimize last updated?
The latest version, 3.1.16, was released on September 26, 2026 (10 hours ago).
Who makes Autoptimize?
Autoptimize is developed and maintained by Optimizing Matters.
What are the best alternatives to Autoptimize?
The most popular alternatives to Autoptimize are WP Fastest Cache (1M+ installs), NitroPack (90K+ installs) and Speed Booster Pack ⚡ PageSp… (8K+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card