Title: Plugin breaks site
Last modified: April 29, 2019

---

# Plugin breaks site

 *  [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/)
 * Hi,
 * I am using autoptimize plugin with WP Fastest Cache. It works fine. but from 
   more then a month I am getting issue “jQuery is not defined” and it breaks my
   site like popup video’s not playing as I have one on my homepage, forms not submitting,
   Add to Cart button stops working…… So When I disabled “Autoptimize” plugin, all
   worked, But site speed goes worst.
 * Can you help me, what should I do to maintain my site speed??
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-breaks-site-11%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/plugin-breaks-site-11/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/plugin-breaks-site-11/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-breaks-site-11/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11477711)
 * Can you try adding `js/jquery/jquery.js` to the comma-separated JS optimization
   exclusion list?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478190)
 * so we need to exclude js/jquery/jquery.js from optimize??
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478218)
 * given the “jQuery not defined”-error; yes 🙂
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478228)
 * I excluded js/jquery/jquery.js as you told, but still getting same issue as I
   described.
    [⌊2019-04-29_1933⌉](https://www.screencast.com/t/YWnankX6c)
 * Homepage video is not opening in facnybox, Add to cart is not working, forms 
   not submitting as I said.
    Here are the warning in console [https://www.screencast.com/t/LuBp8dy8](https://www.screencast.com/t/LuBp8dy8)
   after activate plugin.
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478261)
 * with disabling plugin, I didn’t get any issue I described above [https://www.screencast.com/t/fxMMFqkO9UNm](https://www.screencast.com/t/fxMMFqkO9UNm)
 * and my site breaks like [https://www.screencast.com/t/iXVqtNtGwB](https://www.screencast.com/t/iXVqtNtGwB)
   
   also my site speed effects.
    -  This reply was modified 7 years, 1 month ago by [nonni2019](https://wordpress.org/support/users/nonni2019/).
    -  This reply was modified 7 years, 1 month ago by [nonni2019](https://wordpress.org/support/users/nonni2019/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478420)
 * well, even though things are not entirely working yet, you don’t have the “jQuery
   not defined”-error any more, which is an important first step.
 * next step; untick the “aggregate JS” option to see if things work that way?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478533)
 * I unchecked the “aggregate JS” option, as you said.
    [⌊2019-04-29_2044⌉](https://www.screencast.com/t/3l16sjFjcza9)
 * Now site works, as I tested after clearing cache.
 * What other options, I have to choose like I exclude few JS files
    [⌊2019-04-29_2045⌉](https://www.screencast.com/t/nTaFe1CTIu)
 * Desktop site speed is little good, but mobile still too bad.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11478827)
 * Well, you _should_ be able to re-activate “aggregate JS” but in that case you’ll
   have to find out which JS-files to exclude from being optimized.
 * Given the fact that earlier the autoptimized file was not found (as per [https://www.screencast.com/t/LuBp8dy8](https://www.screencast.com/t/LuBp8dy8)),
   it is not impossible you don’t have to exclude at all, but that you just have
   to make sure all page caches are cleared after having cleared Autoptimze’s cache?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11479982)
 * I reactivated the “Aggregate JS” as you said. And after reactivate, I cleared
   the page cache. But now, there is a lots of warnings in the console, almost for
   all the pages
    [⌊2019-04-30_0620⌉](https://www.screencast.com/t/a2BZ2dvz9rAd)
 * And again my video issue comes up. No video opens in fancybox, it redirects to
   youtube.
    -  This reply was modified 7 years, 1 month ago by [nonni2019](https://wordpress.org/support/users/nonni2019/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480398)
 * OK, when that happens check the contents of `wp-content/cache/autoptimize/js`(
   using (s)ftp or your hoster’s cpanel or using a file manager plugin) to see if
   that files that are not loaded are indeed not there?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480526)
 * these are the JS files in wp-content/cache/autoptimize/js
    [⌊2019-04-30_1150⌉](https://www.screencast.com/t/qcRdBNWC)
 * And the files shown in [https://www.screencast.com/t/a2BZ2dvz9rAd](https://www.screencast.com/t/a2BZ2dvz9rAd)
   screenshot are there
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480605)
 * OK, if the browser says the files are not there but the files are there (on the
   file system) then something is stopping those files from being used in the browser
   and that seems to be the root of the problem.
 * e.g. [https://www.bedbugbarrier.com.au/wp-content/cache/autoptimize/js/autoptimize_single_1bdc97fbe6e6de21c02cd8999c4cc1d1.js](https://www.bedbugbarrier.com.au/wp-content/cache/autoptimize/js/autoptimize_single_1bdc97fbe6e6de21c02cd8999c4cc1d1.js)
   is mentioned as not having been loaded in your browser console screenshot, but
   it is there in your file manager and I can open it without any problems in my
   browser (tests Firefox & Chrome).
 * No idea why this is happening I’m afraid, from AO’s pov all is well; the JS is
   optimized, the optimized files are cached, the HTML refers to those optimized
   files. Does opening the individual files (e.g. the link in the previous paragraph)
   work for you? Did you try in other browsers?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480621)
 * Yes, files are opening. When I open individual files, as you mentioned. Files
   are working.
 * So where I have too look for this issue??
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480740)
 * well, I would test in different browsers/ on different computers to start with?
 *  Thread Starter [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * (@nonni2019)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/#post-11480772)
 * Right now, I unchecked the “Aggregate JS” option. Because I don’t want to loose
   any sales.
 * If you want to test, then it’s best we will do that in my mid-night time i.e 
   after 5 hours, if possible.

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/plugin-breaks-site-11/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/plugin-breaks-site-11/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-breaks-site-11/page/2/?output_format=md)

The topic ‘Plugin breaks site’ 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/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)

 * 40 replies
 * 2 participants
 * Last reply from: [nonni2019](https://wordpress.org/support/users/nonni2019/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/plugin-breaks-site-11/page/3/#post-11484511)
 * Status: not resolved