File and media optimizations change how CSS, JavaScript and images load. Most sites work fine, but some themes and plugins expect their files in a certain order or at a certain time. When a page looks wrong or stops responding after you turn on an optimization, this guide helps you find the cause and fix it without giving up the speed gains.
Available in: Powered Cache (free). Critical CSS, Remove Unused CSS and CSS safeguards need Powered Cache Premium.
Where to find it: Powered Cache → File Optimization and Powered Cache → Media
Step 1: Confirm that an optimization causes it #
- Open the broken page in a private browser window.
- Open the same page with
?nopoweredcache=1at the end of the address. This loads the page without any Powered Cache optimization. See Bypass cache. - Compare the two:
- Works with the parameter: an optimization is the cause. Continue with step 2.
- Broken in both: Powered Cache is not the cause. Check recent theme or plugin changes.
If visitors are affected and you need time to investigate, turn on Development Mode in Powered Cache → Tools. It switches off caching and all optimizations on the front end until you turn it off again.
Also open the browser’s developer tools and look at the Console tab. A JavaScript error such as jQuery is not defined points to a script loading problem and often names the file involved.
Step 2: Find the feature #
Turn the features off one at a time, starting with the most likely one for your symptom. After each change, click Save Settings, clear the cache with Purge All Cache in the admin bar, and reload the page in a private window. If your host or CDN caches pages too, clear that cache as well.
| Symptom | Check these first |
|---|---|
| Menus, sliders, tabs or buttons do nothing until you scroll or click | Delay JavaScript |
| JavaScript errors in the console, features missing | Defer JavaScript, then Combine JavaScript and Minify JavaScript (Minify and combine JavaScript) |
| Parts of the page unstyled, or styles missing on hover, in pop-ups or menus | Remove Unused CSS, then Combine CSS and Minify CSS (Minify and combine CSS) |
| The page looks wrong for a moment, then corrects itself | Critical CSS |
| Images or videos stay blank, or above-the-fold images flicker | Lazy Load |
| Spacing or inline elements change, or inline scripts break | Minify HTML and HTML DOM Optimization |
| Fonts look different | Google Fonts optimization |
When the page works again, the last feature you turned off is the cause. Do not leave it off yet: in most cases an exclusion fixes the problem and keeps the feature’s benefit for the rest of the site.
Step 3: Exclude the file or element #
Find the file that breaks. The console error, the Network tab or the page source usually shows its address, for example /wp-content/plugins/some-slider/js/slider.min.js. Add a unique part of the address to the exclusion field of the feature:
| Feature | Exclusion setting | Example entry |
|---|---|---|
| Delay JavaScript | Delay JavaScript Exclusions | some-slider/js |
| Defer JavaScript | Defer JavaScript Exclusions | jquery.min.js |
| Minify or combine JavaScript | Excluded JavaScript Files | /wp-content/plugins/some-slider/* |
| Minify or combine CSS | Excluded CSS Files | /wp-content/themes/my-theme/custom.css |
| Remove Unused CSS (Premium) | Unused CSS Safelist for selectors, Unused CSS Excluded Files for whole files | .menu-open |
| Critical CSS (Premium) | Critical CSS Excluded Files, or Append to Critical CSS for missing rules | .site-header { min-height: 80px; } |
| Lazy Load | Lazy Load Exclusions, or the skip-lazy class on the image | hero-image |
Exclusion fields accept one rule per line and * as a wildcard. Then turn the feature back on, save, clear the cache and test again. If something else breaks, repeat this step for the next file.
After you change CSS exclusions for Critical CSS or Remove Unused CSS, click Regenerate for that service in the CSS Optimization Status panel on Powered Cache → File Optimization, so the stored CSS is rebuilt.
Step 4: Turn off a feature on one page only #
If only one page is affected, for example a landing page with a special form, turn the feature off for that page instead of for the whole site. Edit the page and open the Powered Cache panel in the editor sidebar:
- Disable lazy loading for this post
- Disable CSS optimization and Disable JS optimization (minify and combine)
- Disable JS defer for this post and Disable JS delay for this post
- With Premium: Disable Critical CSS for this post and Disable UCSS for this post, or Generate specific Critical CSS and Generate specific UCSS for a page whose layout differs from the rest of its type
See Exclude a page from the cache for all per-post options.
Check the CSS safeguards (Premium) #
Powered Cache Premium applies CSS compatibility safeguards for your theme, plugins and host when it generates Critical CSS and used CSS. They keep known dynamic styles safe. If a layout problem appears only with Critical CSS or Remove Unused CSS, review the applied safeguards in the CSS Optimization Status panel. To test whether a single source is involved, click the Pause link next to it in the Applied safeguards box. See CSS compatibility safeguards.
Still broken? #
- Make sure you cleared every cache layer, including your browser cache, the host cache and your CDN.
- Check that the problem is not a combination: turn off all file optimizations, then turn them on one at a time, testing after each one.
- If another optimization plugin is active, keep each task in one plugin. See Other optimization plugins.
- Contact support with the page address, the feature that causes the problem and any console errors.