Fix slow WordPress caching by cleaning Autoptimize, tuning its settings, and stopping it from hoarding old files. Autoptimize is great. Until it is not. A bloated cache can make your site feel like it is walking through syrup.
TLDR: Open Settings > Autoptimize, clear the cache, then reduce what Autoptimize is trying to optimize. If your cache folder is huge, your server may slow down when creating and serving files. For example, one small blog went from a 4.7 second load time to 2.1 seconds after clearing a 1.3 GB Autoptimize cache and disabling unused CSS options. Start with JavaScript, CSS, and image settings before blaming your host.
Why Autoptimize Can Feel Slow
Autoptimize does not work like a full page cache plugin.
That part trips people up.
It mainly optimizes files. It can minify CSS. It can combine scripts. It can lazy load images. It can save optimized files in its own cache folder.
That is helpful.
But when that folder gets too large, things get annoying fast.
Your site may show these symptoms:
- Pages load slower than usual.
- The admin area feels sticky.
- Autoptimize cache size keeps growing.
- Changes do not show on the front end.
- CSS breaks after updates.
- JavaScript features stop working.
Honestly, it feels like fixing one speed problem creates three tiny gremlins.
Step 1: Clear the Autoptimize Cache
Start with the simple fix.
In WordPress, go to:
Settings > Autoptimize
At the top, look for the cache info. Click Clear cache.
You can also clear it from the WordPress admin bar. Hover over Autoptimize. Then click Clear Cache.
Now test your site in a private browser window.
If load time drops right away, the cache was likely bloated.
Here is a simple rule:
- Under 100 MB: usually fine.
- 100 MB to 500 MB: watch it.
- Over 500 MB: clean it and adjust settings.
- Over 1 GB: yep, that is probably trouble.
Expect to waste time on this if your host has low disk speed. Even simple cache tasks can take extra seconds.
Step 2: Stop Autoptimize From Combining Too Much
Older advice often says to combine every CSS and JS file.
That advice is not always good now.
Many sites use HTTP/2 or HTTP/3. These can load many small files well. Combining everything may create one giant file. That file can be slower to update. It can also break things.
Go to Settings > Autoptimize > JS, CSS & HTML.
Try this setup first:
- Optimize JavaScript Code: enabled.
- Aggregate JS files: disabled at first.
- Optimize CSS Code: enabled.
- Aggregate CSS files: disabled at first.
- Optimize HTML Code: enabled only if it does not break layout.
Save changes. Clear the cache. Test again.
If the site works, you can test aggregation later. One switch at a time. Do not flip six switches and hope for magic.
Step 3: Exclude Problem Files
Some files hate being optimized.
They throw a tiny tantrum. Then your menu stops opening. Or your slider freezes. Or checkout gets weird.
If something breaks, exclude that file.
Common files to exclude include:
jquery.jsjquery.min.js- theme slider scripts
- checkout scripts
- form plugin scripts
- ad scripts
You can add exclusions inside the Autoptimize settings.
Use the file name or part of its path.
Example:
wp-includes/js/jquery/jquery.min.js
After each exclusion, clear the cache again.
Yes, it is repetitive. No, it is not glamorous. But it works.
Step 4: Fix Image Lazy Loading
Images are often the true speed pests.
Autoptimize can lazy load images. This means images load only when needed. Great idea.
But do not lazy load your logo or main hero image.
That can make the top of the page feel slow.
Use lazy loading for images below the first screen.
Check these settings under Images:
- Enable lazy loading for below the fold images.
- Exclude your logo.
- Exclude the first big hero image.
- Use WebP if your setup supports it.
A simple test helps.
Open your home page on your phone. Use mobile data, not Wi Fi. If the first image pops in late, exclude it from lazy loading.
Step 5: Use a Real Page Cache Too
This matters.
Autoptimize is not a full replacement for page caching.
It improves assets. A page cache stores the finished HTML of a page. That means WordPress does less work on each visit.
Pair Autoptimize with one page cache tool.
Good options include:
- LiteSpeed Cache, if your server uses LiteSpeed.
- WP Super Cache, for a simple setup.
- Cache Enabler, for a clean and light option.
- WP Rocket, if you want paid convenience.
Do not run three cache plugins at once.
That is how you get mystery bugs.
Use one page cache plugin. Use Autoptimize for CSS, JS, HTML, and images. Keep the roles clear.
Step 6: Set a Cache Cleanup Habit
Autoptimize cache can grow after edits, plugin updates, theme changes, and CSS changes.
If your site changes often, clear it often.
Use this schedule:
- Small blog: once every 2 to 4 weeks.
- Active business site: once per week.
- WooCommerce store: after plugin or theme updates.
- Busy news site: monitor cache size every few days.
You can also check cache size inside Autoptimize. If it climbs too fast, your settings are too aggressive.
Step 7: Test Like a Normal Visitor
Do not only test while logged in.
Logged in users often skip cache. Or they see admin scripts. That can make results messy.
Test these ways:
- Use an incognito window.
- Test on mobile.
- Test with PageSpeed Insights.
- Use GTmetrix or WebPageTest.
- Click real pages, not only the home page.
Check these numbers:
- Largest Contentful Paint: aim under 2.5 seconds.
- Total Blocking Time: lower is better.
- Page size: keep it lean.
- Requests: reduce junk, not useful files.
Best Autoptimize Settings to Try First
Here is a safe starting point for many WordPress sites:
- Optimize JavaScript: on.
- Aggregate JavaScript: off.
- Optimize CSS: on.
- Aggregate CSS: off.
- Inline critical CSS: test carefully.
- Optimize HTML: on, unless it causes issues.
- Lazy load images: on, with top images excluded.
- Also optimize for logged in users: usually off.
If the site is stable, test one extra feature at a time.
Write down what you changed.
That sounds boring. It saves you later.
When Autoptimize Is Not the Real Problem
Sometimes Autoptimize gets blamed unfairly.
Your site may still be slow because of:
- Cheap hosting with weak CPU.
- Too many plugins.
- A heavy page builder.
- Huge images.
- Slow third party scripts.
- Ads and tracking tags.
- No server level cache.
Disable Autoptimize for five minutes and test again.
If the site is still slow, the problem is elsewhere.
If the site gets faster, return to Autoptimize and trim the settings.
The Quick Fix Checklist
- Clear the Autoptimize cache.
- Check cache size.
- Turn off JS aggregation.
- Turn off CSS aggregation.
- Exclude broken scripts.
- Do not lazy load the hero image.
- Add one proper page cache plugin.
- Test while logged out.
- Repeat after updates.
The goal is simple. Let Autoptimize make files lighter, not heavier. Keep the cache clean. Keep settings boring. Your WordPress site should load fast without feeling like a science project.