Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →For most WordPress sites, start with three low-risk switches: turn on Optimize JavaScript Code, Optimize CSS Code, and Optimize HTML Code. Keep HTML comments disabled. Leave Force JavaScript in the head, Inline all CSS, and Generate data URLs for images disabled. Treat JavaScript/CSS aggregation as an experiment, not an automatic speed boost, and use a separate page-cache plugin because Autoptimize does not cache complete pages.
This setup reduces file and markup overhead without forcing every asset into one large bundle. The exact best configuration depends on your theme, plugins, traffic pattern, and whether your site’s JavaScript is already delivered efficiently. Apply one change at a time, clear every relevant cache, test in GTmetrix or PageSpeed Insights, and check real interactions such as forms, menus, popups, carts, and logged-in views.
As an Amazon Associate I earn from qualifying purchases.
Recommended Autoptimize settings at a glance
The table below is a safe starting point for a typical WordPress installation. “On” means enable the option in Autoptimize; “test” means do not enable it globally until you have measured the result and checked the site’s behavior.
| Setting | Starting value | Why | Main risk |
|---|---|---|---|
| Optimize JavaScript Code | On | Minifies JavaScript and is the normal low-risk optimization. | Unusual scripts can fail after minification. |
| Aggregate JS files | Test first | Can reduce requests on small sites with a small combined payload. | One bundle can create compatibility errors or a larger cache. |
| Aggregate inline JS | Off | Keeps the Autoptimize cache from growing rapidly. | Turning it on can break popups and other inline behavior. |
| Force JavaScript in the head | Off | Avoids making JavaScript render-blocking. | Loading scripts early can delay first rendering. |
| Add try-catch wrapping | Off | Use only as a temporary compatibility test. | Can hide the underlying script conflict. |
| Optimize CSS Code | On | Minifies CSS files with little configuration effort. | Malformed or unusual CSS may expose a browser issue. |
| Aggregate CSS files | Test first | May help a small site with a very small CSS payload. | Large combined files and stylesheet conflicts. |
| Aggregate inline CSS | Off unless tested | Prevents unnecessary cache growth. | More cache variants and possible layout changes. |
| Inline all CSS | Off | Preserves browser caching of stylesheet files. | Much larger HTML and no reusable CSS file cache. |
| Inline and defer CSS | Off initially | Its current-release behavior was not established for this guide. | Visual changes or delayed styling if configured incorrectly. |
| Generate data URLs for images | Off | Avoids inflating CSS or HTML with encoded image data. | Larger documents and poorer caching. |
| Optimize HTML Code | On | Removes unnecessary markup whitespace and overhead. | Rarely, sensitive inline markup can be affected. |
| Keep HTML comments | Off | Removes comments that visitors do not need. | Developer comments disappear from the delivered page. |
What Autoptimize does—and what it does not do
Autoptimize optimizes delivery of front-end assets. Depending on the options you select, it minifies JavaScript, CSS, and HTML; optionally combines files; and changes how some styles or scripts are delivered. These operations can reduce bytes or requests, but they do not automatically make database queries faster, resize original images, or cache a complete page response.
#1 Best Overall
The distinction matters because a page can still be generated on every request after Autoptimize has optimized its assets. Add a full-page cache plugin or an equivalent server cache for anonymous visitors. One commonly documented pairing is Autoptimize with WP Super Cache, but the important requirement is the caching function, not a particular product. Configure only one primary page-cache layer unless your host documents a compatible combination.
Autoptimize also creates its own optimized-asset cache. That cache is separate from a page cache and can grow quickly when inline JavaScript or CSS is aggregated across many page variants. A cache purge is therefore part of every settings change.
Before changing settings
Record a baseline
Test a representative page before enabling anything. Use the same URL, device profile, connection setting, and test location for each comparison. Run more than one measurement and record the result rather than treating one score as a definitive speed rating. GTmetrix and PageSpeed Insights are suitable for repeatable checks.
- Record the page-load waterfall, total transfer size, request count, and the major render-blocking resources.
- Note whether the page is logged out, because cached and uncached responses can differ.
- Capture a screenshot of the current layout and test the site’s most important interactions.
- Identify any existing optimization, CDN, script-manager, or cache plugins that may also rewrite assets.
Use a staging copy when possible
Asset rewriting can affect every visitor at once. A staging copy lets you test a theme, page builder, checkout, membership area, or multilingual setup without exposing a broken bundle publicly. If staging is unavailable, make changes during a low-traffic period and keep an administrator session open so you can revert quickly.
Understand cache layers
After every change, purge Autoptimize’s cache, your page cache, any host-level cache, and your CDN cache if one is active. Otherwise you may compare an old HTML document with new CSS or JavaScript, producing symptoms that disappear later—or a false impression that a change had no effect.
JavaScript settings: the safest order of operations
Optimize JavaScript Code: On
Enable Optimize JavaScript Code first. Minification removes unnecessary characters while preserving the script’s logic. It is generally the lowest-risk JavaScript setting because it does not require combining every file or moving execution to a different part of the document.
After enabling it, purge caches and test the homepage, navigation menu, search, contact forms, login, cookie controls, sliders, video controls, and any page-builder widgets. Also test the browser console for new JavaScript errors. If one feature fails, disable the option temporarily to confirm causation, then use exclusions for the specific file when possible rather than abandoning optimization for every script.
Aggregate JS files: use a measured threshold, not a rule
Aggregation combines multiple JavaScript files into a generated file. A guide heuristic cited in current coverage is roughly 10 KB of combined JavaScript/CSS as the point at which aggregation may be worth testing on a small site. That figure is not an Autoptimize limit or a published standard. Treat it as a rough decision aid from a waterfall, not as a target you must meet.
For a small brochure site with several tiny files, one bundle can reduce request overhead. For a large site, a single bundle may be larger than the files a visitor actually needs, may invalidate more often, and may combine scripts with incompatible loading assumptions. HTTP/2 and HTTP/3 also make multiple well-cached files less costly than they were under older delivery conditions, so fewer requests alone does not prove a faster page.
Turn aggregation on only after recording a baseline. Purge caches, run the same performance test, and inspect the waterfall and total transfer size. Keep it enabled only if the measured result improves without introducing layout or interaction failures.
Aggregate inline JS: normally Off
Leave Aggregate inline JS disabled initially. Inline scripts often vary by page, user state, nonce, or generated settings. Combining them can make the Autoptimize cache grow quickly, and a reported real-world failure involved a popup no longer appearing after inline JavaScript aggregation was enabled.
Recommended Free Tools
If you test this option, use a staging site or a narrow traffic window. Check every template that emits inline configuration, including forms, popups, analytics consent tools, and logged-in dashboards. If the cache expands or a feature becomes unreliable, turn this option off before changing other JavaScript settings.
Force JavaScript in the head: Off
Keep Force JavaScript in the head off. Moving scripts into the document head causes them to load earlier and can make them render-blocking, delaying the first visible content. The option may appear to fix a dependency that expects early execution, but it trades that compatibility for slower rendering.
If one script truly needs special handling, exclude that file or handle its dependency explicitly rather than moving every optimized script into the head. Re-test both the affected feature and the page’s rendering metrics after any exclusion.
Add try-catch wrapping: Off unless diagnosing a conflict
Try-catch wrapping can prevent one JavaScript exception from stopping the rest of a bundle, but it can also conceal the original error. Keep it off as a normal setting. If aggregation causes a failure, first identify and exclude the conflicting file. Use wrapping only as a temporary diagnostic or compatibility experiment, then verify that the underlying error is understood.
CSS settings: reduce bytes without defeating caching
Optimize CSS Code: On
Enable Optimize CSS Code to minify stylesheet files. As with JavaScript, change one option, purge all caches, and inspect pages with responsive layouts, forms, tables, galleries, and page-builder components. Look for missing styles, incorrect spacing, broken breakpoints, and font or icon changes.
Aggregate CSS files: test on small payloads
CSS aggregation follows the same decision as JavaScript aggregation. It can be useful when a small site serves several very small stylesheets, but it can create a large generated file on a complex theme. A combined stylesheet can also make one plugin’s CSS interact with another plugin’s ordering or specificity.
Use the waterfall to determine whether the site is actually waiting on many tiny CSS files. If stylesheets are already few, compressed, and cacheable, aggregation may provide little benefit. Keep it only when repeated tests show a faster result and no visual regressions at desktop and mobile widths.
Aggregate inline CSS: Off unless testing proves a benefit
Guidance on Aggregate inline CSS is mixed. Some setup guides enable it, while the official WordPress.org listing warns that inline aggregation can make the cache too large and suggests disabling inline JavaScript and/or CSS aggregation when cache size becomes a problem. The safer default is therefore off.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsInline CSS is often generated for a particular page, widget, or responsive state. If you enable aggregation, monitor Autoptimize’s cache size and check pages that use customizer CSS, page-builder blocks, popups, and conditional templates. Revert this option first if styles are stale or the cache expands disproportionately.
Inline all CSS: Off
Do not enable Inline all CSS as a general speed setting. It places the stylesheet content in the HTML document, increasing the size of every page and preventing the browser from reusing a cached CSS file across pages. Although inlining can change when styles become available, the larger HTML response and lost stylesheet caching often outweigh that advantage.
Inline and defer CSS: treat as an advanced experiment
Inline and defer CSS is the option most closely related to critical-style delivery, but its behavior in the current release was not confirmed for this guide. Leave it off in a baseline configuration. If you test it, use a staging copy, inspect the first paint and layout shift, and verify that above-the-fold and below-the-fold elements remain styled during loading. Do not describe the feature as automatic critical-CSS generation without confirming the exact release documentation.
Generate data URLs for images: Off
Keep Generate data URLs for images disabled. Encoding images into CSS or other generated assets increases the containing document and prevents those images from being cached as independent resources. It can also make a small stylesheet unexpectedly large. Leave image optimization and responsive image selection to tools designed for those jobs.
HTML settings: low-risk cleanup
Optimize HTML Code: On
Enable Optimize HTML Code to remove unnecessary whitespace and markup overhead from the delivered document. The byte savings are usually modest compared with image, font, or script payloads, but the setting is generally low risk. Check forms, inline JSON, structured data, and page-builder output after enabling it.
Keep HTML comments: Off
Leave Keep HTML comments disabled for production pages. Comments are useful to developers but do not help visitors and add bytes to every response. If a temporary diagnostic comment is needed, inspect the uncached source during debugging rather than retaining all comments for every user.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to apply the configuration safely
- Open Autoptimize. In WordPress, go to Settings → Autoptimize. Confirm that you are changing the intended site, especially in a multisite installation.
- Configure JavaScript. Enable Optimize JavaScript Code. Leave aggregation, inline aggregation, head forcing, and try-catch wrapping off for the first pass.
- Configure CSS. Enable Optimize CSS Code. Leave CSS aggregation, inline aggregation, inline-all-CSS, inline-and-defer CSS, and data URLs off initially.
- Configure HTML. Enable Optimize HTML Code and disable Keep HTML comments.
- Save the changes. Use the page’s save button and allow Autoptimize to regenerate its optimized assets.
- Purge every cache. Clear Autoptimize, page-cache, host, and CDN caches before testing.
- Test behavior. Visit representative pages in a private browser window and test forms, menus, popups, search, media controls, login, and any revenue-critical flow.
- Measure performance. Run the same GTmetrix or PageSpeed Insights test used for your baseline. Compare transfer size, requests, render-blocking resources, and user-visible timing—not only a letter grade.
- Change one option. If the result is stable, test one aggregation option at a time. Keep a simple change log so you can identify the setting responsible for an improvement or failure.
Should you aggregate CSS and JavaScript?
| Site situation | Recommended approach | Reasoning |
|---|---|---|
| Small brochure site with many tiny assets | Test JS and CSS aggregation separately. | A smaller request count may help, but only measurement can confirm it. |
| Large theme with page builder and many plugins | Leave aggregation off initially. | Bundles become large and dependency or ordering conflicts are more likely. |
| Site already using HTTP/2 or HTTP/3 | Prefer minification and caching; test aggregation rather than assuming it helps. | Multiplexed requests reduce the penalty for several small files. |
| Frequent page-specific inline scripts or styles | Keep inline aggregation off. | Generated variants can enlarge the cache and become stale. |
| Authenticated, membership, or checkout-heavy site | Use staging and extensive interaction tests before any aggregation. | Dynamic dependencies and conditional assets make failures expensive. |
The practical rule is simple: aggregate only when the waterfall shows a credible opportunity and repeat tests show a net gain. A lower request count is not a win if the generated file is larger, blocks rendering, or breaks a conversion path.
Troubleshooting common failures
A popup, menu, or form stops working
- Purge all caches and test in a private window to rule out stale assets.
- Turn off JavaScript aggregation and inline JavaScript aggregation first; these are common sources of ordering and cache-variant problems.
- If the feature returns, re-enable only minification and identify the specific script that needs exclusion.
- Inspect the browser console for the first error, not just the final cascade of errors.
The page is unstyled or has a flash of incorrect layout
- Disable CSS aggregation and inline CSS aggregation.
- Leave Inline all CSS and Inline and defer CSS off while diagnosing.
- Purge Autoptimize, page, host, and CDN caches.
- Check both mobile and desktop breakpoints, because a page-specific stylesheet may be missing only at one viewport.
Performance scores get worse
Do not chase the score by enabling every switch. Compare the waterfall and transfer size with the baseline. If forcing JavaScript into the head was enabled, turn it off because it can make scripts render-blocking. If inline-all-CSS or data URLs were enabled, revert them and measure again. Verify that a page cache is active; Autoptimize alone does not cache complete HTML responses.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →The Autoptimize cache grows rapidly
Disable inline JavaScript aggregation and inline CSS aggregation first. Those options can create many generated variants, especially on sites with page-specific or user-specific inline content. Then purge the generated assets and monitor cache growth after normal traffic resumes.
Changes appear inconsistent
Check for multiple cache layers serving different versions. Purge each layer, wait for regenerated assets, and test from an uncached browser session. A logged-in administrator may bypass the page cache while a public visitor receives an older document, so compare like with like.
An optimization plugin conflicts with another plugin
If initialization order is the issue, Autoptimize’s FAQ documents the AUTOPTIMIZE_INIT_EARLIER definition in wp-config.php as a way to change when Autoptimize initializes. Treat this as an integration change: back up the file, apply it on staging first, and verify that the conflict is actually caused by initialization order before keeping it in production.
A repeatable testing checklist
- Use the same URL, test device, connection, and location for before-and-after runs.
- Run multiple tests and compare the pattern, not one unusually high or low result.
- Clear all cache layers after each setting change.
- Check the generated page source and waterfall for the expected optimized assets.
- Test logged-out pages and, where relevant, logged-in or personalized pages separately.
- Exercise forms, menus, search, popups, sliders, video, consent controls, account pages, and checkout.
- Check desktop and mobile layouts at the breakpoints your audience uses.
- Keep a change log with the setting, date, cache purge, measured result, and observed side effects.
- Revert the last aggregation change first when something breaks.
Limits of the evidence and realistic expectations
There is no published, general Autoptimize speed-gain statistic that applies to every WordPress site. The roughly 10 KB aggregation figure is a guide heuristic, not a vendor guarantee or standards threshold. Your result depends on the theme, plugins, server, cache hit rate, protocol, geographic distance, and page content.
Free tools Windows power users keep installed
One-click scans. No signup required.
Do not assume that enabling more options produces a proportionally faster site. Minification, browser caching, and full-page caching address different bottlenecks. Image dimensions, font loading, server response time, database work, and third-party scripts may dominate the waterfall even after Autoptimize is configured correctly. Use the plugin to remove avoidable asset overhead, then use your measurements to decide what deserves the next optimization effort.
A practical production profile
For a cautious first deployment, enable only Optimize JavaScript Code, Optimize CSS Code, and Optimize HTML Code; disable Keep HTML comments; and leave every aggregation, forced-head, inline-all-CSS, inline-and-defer, try-catch, and data-URL option off. Pair that profile with a page-cache layer, purge caches, and test the real site. If the baseline shows a small site is paying a measurable request overhead, test JavaScript aggregation and CSS aggregation independently. Keep whichever change produces a repeatable net improvement without breaking behavior, and revert the rest.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




