Title: Inline CSS not regenerated
Last modified: February 15, 2021

---

# Inline CSS not regenerated

 *  Resolved [bostjanlaba](https://wordpress.org/support/users/bostjanlaba/)
 * (@bostjanlaba)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/)
 * I’ve enabled Autoptimize and it worked. Then I added some custom CSS to the theme
   and emptied cache. The custom CSS was not working. Then I disabled Autoptimize
   and it worked. Reenabled Autoptimize – back to the start.
 * Point is, after adding custom CSS the Autoptimize does not regenerate inline 
   CSS when emptying cache.
 * Can you please fix this so I can enable Autoptimize again?
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050351)
 * Not sure I understand, can confirm the problem goes away when you disable CSS
   optimization and if so can you list your Autoptimize CSS settings?
 * frank
 *  Thread Starter [bostjanlaba](https://wordpress.org/support/users/bostjanlaba/)
 * (@bostjanlaba)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050384)
 * The setting that matters is this:
    **Also aggregate inline CSS?**
 * If enabled it “ignores” my custom css (added after Autoptimize was installed).
   If I disable it, my css is in effect.
 * So my guess it the RE-aggregation of CSS files does not happen on cache emptying.
 * Bostjan
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050403)
 * Not really; when you clear the cache (or when AO “sees” new CSS) it will generate
   new optimized CSS-files, CSS order can matter as CSS can get overwritten by other
   CSS. What is likely happening is that you have some CSS excluded from being autoptimized(
   maybe page builder one in `wp-content/uploads`) and when also aggregating inline
   CSS your custom CSS is loaded before the excluded one and hence is overwritten.
 * Just keep “also aggregate inline CSS” off or alternatively exclude your custom
   CSS and all will be well 🙂
 *  Thread Starter [bostjanlaba](https://wordpress.org/support/users/bostjanlaba/)
 * (@bostjanlaba)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050411)
 * Okey dokey, thanks!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050470)
 * you’re welcome Bostjan, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * frank

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Inline CSS not regenerated’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/inline-css-not-regenerated/#post-14050470)
 * Status: resolved