Autoptimize Settings (2026): What I Used on a Real Site + Before/After Results

Autoptimize settings: JavaScript options with Optimize JavaScript and Do not aggregate but defer on

Most Autoptimize settings guides still describe options the current version greys out or hides. I set Autoptimize up from scratch on a real WordPress site in November 2026, measured the page before and after, and wrote down every option I changed and why. Below are the exact Autoptimize settings I used, what each one does, what I’d leave off, and how to fix things when the plugin breaks your layout.

Quick answer: turn on Optimize JavaScript with Do not aggregate but defer, turn on Optimize CSS without aggregation, turn on Optimize HTML, keep lazy-loading on in the Images tab, and remove emojis in Extra. Pair it with a page cache plugin, because Autoptimize doesn’t cache pages. Added on top of WP Super Cache, those settings took my test page from PageSpeed 96 to 100, LCP from 2.7 s to 1.7 s, and page weight from 413 kB to 140 kB.

Tested: Autoptimize 3.1.17 (free) with WP Super Cache, WordPress 7.1.4, PHP 8.5, Kadence theme, Nginx on an aaPanel VPS in Hong Kong behind Cloudflare. Measured from Dhaka on November 8–9, 2026.

Copy these settings (Autoptimize 3.1.17)

  • JavaScript: Optimize JavaScript code on, Aggregate JS-files off, Do not aggregate but defer on, Also defer inline JS on.
  • CSS: Optimize CSS code on; Aggregate CSS-files, Eliminate render-blocking CSS and Inline all CSS off.
  • HTML: Optimize HTML code on. Leave CDN Base URL empty if you use Cloudflare.
  • Misc: Save aggregated script/css as static files and Enable configuration per post/page on. Enable 404 fallbacks on too, but on Nginx it only works with a try_files rule (see below).
  • Images: Lazy-load images on, Lazy-load from nth image set to 2 (3 if your logo is an image). ShortPixel image optimization off.
  • Critical CSS: off. My page reached 100 without it.
  • Extra: Remove emojis on; Remove query strings and Remove WordPress block CSS off.
  • Page cache: keep a separate cache plugin running. Autoptimize doesn’t cache pages; I used WP Super Cache.

What Autoptimize does (and doesn’t do)

Autoptimize rewrites the CSS, JavaScript and HTML your theme and plugins output: it minifies files, can combine them, defers scripts so they stop blocking the page, lazy-loads images, and removes some WordPress extras like the emoji script. It has 800,000+ active installs and is free.

What it doesn’t do is cache pages. Its “cache” only stores the optimized CSS and JS files. Every page is still built by PHP on each visit unless you also run a page cache (WP Super Cache, W3 Total Cache, your host’s cache) or pay for Autoptimize Pro, which adds one. So the setup in this guide is always page cache + Autoptimize. I used WP Super Cache.

Autoptimize plugin card in WordPress showing 800,000+ active installations

Before and after: what my settings changed

Same page, same server. The first row is WP Super Cache alone; the second adds Autoptimize with the settings in this guide.

SetupPSI mobileLCPSpeed IndexRequestsTransferredLoad“Reduce unused CSS”
WP Super Cache only962.7 s1.1 s33413 kB1.08 sFlagged
+ Autoptimize1001.7 s1.1 s27140 kB0.89 sPassed

PageSpeed Insights mobile (run from Google’s servers); network numbers from Chrome DevTools in Dhaka. TBT was 0 ms and CLS 0 in both. TTFB is the page cache’s job, not Autoptimize’s, so I left it out here; with the cache on it was about 0.24–0.37 s. If TTFB is your problem, see how to reduce TTFB on WordPress.

PageSpeed Insights mobile score of 96 with WP Super Cache only, before Autoptimize
Before: WP Super Cache only, 96, LCP 2.7 s
PageSpeed Insights mobile score of 100 with WP Super Cache and Autoptimize
After: + Autoptimize, 100, LCP 1.7 s

The biggest win was LCP: one full second faster. First paint stayed at 1.1 s, so most of the gain came from deferred JS and lighter files letting the featured image load sooner. The page also got much lighter, with six fewer requests and about two-thirds less data loaded. On a heavier theme you’ll see bigger numbers in both directions: more to gain, and more chance something needs excluding.

Chrome DevTools Network summary with 33 requests and 413 kB transferred before Autoptimize
Chrome DevTools Network summary showing 27 requests and 140 kB transferred with WP Super Cache and Autoptimize

Autoptimize settings: JS, CSS & HTML tab

Go to Settings → Autoptimize. The first tab holds the settings that matter most. Here’s what I used:

Autoptimize JS, CSS and HTML settings used in the test with defer enabled and aggregation off

JavaScript options

SettingMy choiceWhy
Optimize JavaScript codeOnMinifies your JS files.
Aggregate JS-filesOffCombining all JS into one file breaks sites more often and gains little on HTTP/2 hosting.
Do not aggregate but deferOnKeeps files separate but minified and deferred, so they stop blocking rendering. This is the core of the setup.
Also defer inline JSOnDefers small scripts inside the HTML too. If something breaks, this is the first option to switch off.
Exclude scripts from AutoptimizeEmptyNothing broke. Add a script here only if it misbehaves (see troubleshooting).

CSS options

SettingMy choiceWhy
Optimize CSS codeOnMinifies CSS files.
Aggregate CSS-filesOffSame reasoning as JS: separate minified files tested fine and break less.
Eliminate render-blocking CSSOffThis needs critical CSS rules. Without them it can cause a flash of unstyled content. See the Critical CSS section.
Inline all CSSOffBloats every HTML page; Autoptimize itself recommends against it.
Exclude CSS from AutoptimizeEmptyOnly needed if a stylesheet breaks.

With aggregation off, Autoptimize 3.1 greys out “Also aggregate inline CSS”, “Generate data: URIs”, “Inline all CSS” and the aggregate-JS box. That’s normal; they only apply to aggregated files.

Autoptimize also shows a note under “Remove unused JavaScript”: it combines scripts but can’t tell which ones a page actually uses. It can’t remove unused CSS either (the “Passed” in my table came from minified files dropping under PageSpeed’s threshold, not from removal). If PageSpeed keeps flagging unused CSS on a heavy theme, that’s a job for a plugin with that feature (see my Autoptimize vs WP Rocket test).

HTML, CDN, cache info and misc

Autoptimize HTML options, CDN base URL, cache info and misc options
Taken right after saving, before the cache filled
  • Optimize HTML code: on. It strips whitespace; small saving, no downside on my site. Leave “Also minify inline JS/CSS” and “Keep HTML comments” off.
  • CDN Base URL: leave empty if you use Cloudflare. Autoptimize notes it isn’t needed for Cloudflare. Fill it only if you use a pull CDN with its own hostname.
  • Cache Info: shows the cache folder and confirms Autoptimize can write to it. “Can we write? Yes” is what you want.
  • Save aggregated script/css as static files: on (default). On Nginx, make sure your server config compresses and sets expiry headers for /wp-content/cache/autoptimize/; most panel defaults already cover .css and .js.
  • Enable 404 fallbacks: on. If a cached page points to an old optimized file that was cleared, Autoptimize serves a fallback copy. On Apache this works automatically. On Nginx it needs the short try_files rule from Autoptimize’s FAQ; without it nothing breaks, the option just does nothing.
  • Also optimize for logged in editors/administrators: I left it on so I could see the result while logged in. Turn it off if a page builder misbehaves in the editor.
  • Enable configuration per post/page: on. It adds a box in the editor so you can switch optimizations off for one problem page instead of the whole site.
  • Disable extra compatibility logic: off. Leave Autoptimize’s safety checks in place.

Images tab

Autoptimize Images tab with lazy-load enabled and lazy-load from the second image
  • Image optimization & CDN (ShortPixel): off. It’s a separate service with a limited free quota; I handle images elsewhere.
  • Lazy-load images: on. Images below the fold load only when needed.
  • Lazy-load from nth image: 2. The first image (usually the featured image, often the LCP element) loads immediately. Lazy-loading the LCP image is a common way to make LCP worse. If your header logo is an image, it counts as #1; use 3.
  • Lazy-load exclusions: empty. Add a logo or hero image class here if it loads late.

If your theme or another plugin already lazy-loads images (WordPress core adds loading="lazy" too), you don’t need two layers. Pick one.

Critical CSS tab

Critical CSS is the small piece of CSS needed to draw the top of the page. With it inlined, the rest of the CSS can load later without a flash of unstyled content. In Autoptimize you can write rules by hand, or connect a paid criticalcss.com key to generate them automatically (Autoptimize Pro includes this). How other plugins generate critical CSS, with my numbers, is in critical CSS in WordPress.

I left it off. My page already scored 100 with a 1.7 s LCP without it, and badly made critical CSS causes more problems than it solves. Try it only if PageSpeed still flags render-blocking CSS after the settings above.

Extra tab

Autoptimize Extra tab with remove emojis enabled and Google Fonts left as is
  • Google Fonts: “Leave as is” in my case. If your theme loads Google Fonts, start with “Combine and link in head” (display:swap); try “Combine and link deferred” only if PageSpeed flags fonts as render-blocking, and check for font swaps; “Remove Google Fonts” only if your theme falls back cleanly to system fonts.
  • Remove emojis: on. Removes WordPress’s emoji script and CSS; browsers show emojis anyway.
  • Remove query strings from static resources: off. Autoptimize itself says it won’t improve load time.
  • Remove WordPress block CSS: off, unless you’re sure you don’t use block styles. On a block theme or Kadence Blocks site this can break layouts.
  • Preconnect to 3rd party domains: add only domains you really load from early (for example https://fonts.gstatic.com if you keep Google Fonts, with the protocol). A few at most.
  • Preload specific requests: empty. Use it sparingly, for one font or the LCP image at most.
  • Async JavaScript-files: empty. Defer from the first tab already covers most scripts.
  • Optimize YouTube videos: skip unless you embed videos; it only links to the separate WP YouTube Lyte plugin.

Optimize More! and Pro tabs

The last tabs are upsells. “Optimize More!” lists paid add-ons, and the final tab (it showed “Pro Boosters” on one visit and “Page Cache” on another) promotes Autoptimize Pro: $12.99/month or $89/year for one site (checked November 9, 2026), which adds a page cache, image optimization with CDN, automatic critical CSS and delay-JS. You don’t need either for the setup in this guide.

Clearing the Autoptimize cache

After any settings change, use Save Changes and Empty Cache at the bottom of the settings page, or the Autoptimize menu in the admin bar → Clear CSS/ JS Cache. Then clear your page cache too, otherwise cached pages keep pointing to the old files. Where every other cache layer is cleared, and in what order, is in how to clear WordPress cache.

Autoptimize admin bar menu with the Clear CSS/ JS Cache button

The cache stays tiny. Mine was 5 files and 1.84 KB. Autoptimize only warns you if it grows unusually large, which usually means something on the site generates unique CSS or JS per page.

Troubleshooting: when Autoptimize breaks your site

SymptomMost likely causeFix
Layout looks unstyled or jumps on loadRender-blocking CSS removed without critical CSSTurn off “Eliminate render-blocking CSS”
Menu, slider or popup stops workingA script deferred before what it depends on (often jQuery)Turn off “Also defer inline JS”; if that fixes it, add the script (e.g. js/jquery/jquery.min.js) to “Exclude scripts”. The browser Console often shows “jQuery is not defined” in this case
Page builder editor misbehavesOptimizing for logged-in usersTurn off “Also optimize for logged in editors/administrators”
One page broken, the rest fineA page-specific scriptUse the per-page Autoptimize box in the editor to switch off JS for that page
Changes don’t showOld optimized files or cached pagesEmpty Autoptimize cache, then purge page cache and Cloudflare (more fixes)
Site broken after enabling aggregationCombined file order or a JS errorTurn aggregation back off; use defer instead

A quick way to test: add ?ao_noptimize=1 to the URL. That loads the page without Autoptimize. If the problem disappears, it’s an Autoptimize setting; if not, look elsewhere.

If you’re switching from Autoptimize to another plugin later, remove it cleanly and clear its cache folder. My guide to checking whether WordPress cache is working helps confirm the new setup.

Autoptimize settings for Elementor and page builders

  • Turn off Also optimize for logged in editors/administrators so the builder’s editor loads unoptimized files.
  • Use the per-page Autoptimize box to switch off JS optimization on a page where a builder widget breaks.
  • Keep Disable extra compatibility logic off. Autoptimize’s compatibility logic includes handling for page builders like Elementor.
  • Test sliders, popups and forms after enabling “Also defer inline JS”; builder widgets often rely on inline scripts.

Using Autoptimize with a cache plugin

  • WP Super Cache, Cache Enabler, host caching: these only cache pages, so they pair cleanly with Autoptimize. That’s what I tested.
  • W3 Total Cache, WP Fastest Cache: they have their own minify options. Use either theirs or Autoptimize’s, not both, or you’ll minify the same files twice.
  • WP Rocket: detects Autoptimize and switches off its overlapping options. It works, but WP Rocket alone already does what Autoptimize does (my WP Rocket settings guide covers it). See Autoptimize vs WP Rocket for the numbers.
  • Cloudflare: Rocket Loader can clash with Autoptimize’s defer. Turn it off while you set Autoptimize up, and leave it off unless a re-test shows it helps. My Cloudflare settings for WordPress cover the rest.

Autoptimize review: is it still worth using in 2026?

Yes, if you want a free, lightweight way to fix render-blocking CSS and JS and you already have page caching. On my page it was the difference between 96 and 100, and between a 2.7 s and 1.7 s LCP, for zero cost. The rest of a free setup around it is in my guide to the best WordPress optimization plugins.

Pros: free; small; settings are clear once you know them; per-page control; works fine on Nginx.

Cons: no page cache; no unused-CSS removal or delay-JS in the free version; aggregation can break sites; the settings screens push Pro and ShortPixel upsells.

If you’d rather have one plugin that caches, preloads and removes unused CSS, WP Rocket is the paid option I tested against it; my WP Rocket review has the details.

Want caching and optimization in one plugin instead of two? WP Rocket matched this setup’s score on the same server and went further with Remove Unused CSS.

FAQ

What are the best Autoptimize settings?

For most sites: Optimize JavaScript with “Do not aggregate but defer” and “Also defer inline JS”, Optimize CSS without aggregation, Optimize HTML, lazy-load images from the second image, and remove emojis. Leave critical CSS and aggregation off until you need them.

Should I aggregate JS and CSS in Autoptimize?

Usually not. On HTTP/2 hosting, separate minified files load fine, and aggregation is the setting most likely to break a site. I kept it off and still scored 100.

Does Autoptimize work with WP Super Cache?

Yes. WP Super Cache caches the pages and Autoptimize optimizes the CSS and JS inside them. Clear both caches after changing settings.

Why did Autoptimize break my site?

Usually deferred JavaScript loading before something it depends on, or CSS removed without critical CSS. Switch off “Also defer inline JS” or “Eliminate render-blocking CSS” first, then exclude the specific file.

Is Autoptimize a cache plugin?

No. Its cache only stores optimized CSS and JS files. You still need a page cache plugin or host caching. Autoptimize Pro adds page caching as a paid feature.

Does Autoptimize work on Nginx?

Yes. Everything except 404 fallbacks worked on my Nginx server with no extra rules; fallbacks need one try_files rule from the plugin FAQ. Also make sure your server compresses and sets cache headers for files in /wp-content/cache/autoptimize/.

What Autoptimize settings should I use with Elementor?

Keep the same core settings, but turn off optimization for logged-in editors, keep the extra compatibility logic on, and use the per-page Autoptimize box to switch off JS on any page where a widget breaks.

Is Autoptimize free?

Yes, the plugin is free on wordpress.org. Autoptimize Pro costs $12.99/month or $89/year for one site (checked November 2026).

Related Guides