Title: Cannot Optimize
Last modified: September 1, 2016

---

# Cannot Optimize

 *  Resolved [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/)
 * Hi there,
 * on one of my sites when I go to media -> bulk Optimize and click on “start optimizing”
   it refreshes the page but does nothing else.
 * according to the plugin status its all clear.
 * on another site it gets about 4 images in then has a temporary failure I’m not
   certain what the issue is, and on this site the plugin status is also clear.
 * both sites or on the same VPS
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545273)
 * The first issue is a javascript error, Start Optimizing should NOT refresh the
   page. To find the problem, open the Developers Console in Firefox or Chrome (
   Ctrl+Shift+I), click on the Console tab, and make sure JS/AsyncHttpRequests are
   being displayed. Then reload the bulk page, and you should see an error of some
   sort. You shouldn’t even need to press Start Optimizing, as the behavior you 
   describe indicates script execution has stopped prior to that.
 * The other is likely a timeout issue with a larger image, or image(s) with lots
   of resizes. The upcoming 2.9.0 should help with that, otherwise try increasing
   your max_execution_time in the php.ini.
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545297)
 * hi thanks for your response
 * I get the following from the console:
 *     ```
       16:04:40.133 ReferenceError: jQuery is not defined
       <anonymous>
        load-scripts.php:12
       <anonymous>
        load-scripts.php:12
        load-scripts.php:12:52
       16:04:40.388 TypeError: a.widget is not a function
       <anonymous>
        load-scripts.php:15
       <anonymous>
        load-scripts.php:15
        load-scripts.php:15:29
       16:04:40.440 TypeError: wp.media is undefined
       <anonymous>
        default.js:64
       v.Callbacks/l()
        jquery.min.js:2
       v.Callbacks/c.fireWith()
        jquery.min.js:2
       .ready()
        jquery.min.js:2
       A()
        jquery.min.js:2
        default.js:64:3
       ```
   
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545301)
 * That sounds like something is preventing jQuery scripts from loading (or possibly
   ALL scripts), do you have any plugins that would do such a thing?
    EWWW’s javascript
   for that page explicitly depends on jquery, so that will definitely break it.
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545307)
 * I have no idea, to be honest EWWW did used to work. And then I changed our VPS
   and it no longer works
 * The sites are actually still the same (just theme / plugin updates that have 
   changed things)
 * So I am not aware of anything that would do that. Except perhaps the bridge theme
   as it is a very feature rich theme and has loads of things in it. Bridge can 
   be found here: [http://themeforest.net/item/bridge-creative-multipurpose-wordpress-theme/7315054](http://themeforest.net/item/bridge-creative-multipurpose-wordpress-theme/7315054)
 * (i did used to run EWWW via cron and WP-CLI however since moving I have not got
   wp cli working yet either)
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545310)
 * That makes me wonder if there are some files missing from when you did the transfer(
   if I’m understanding you right). Try re-downloading WordPress from the updates
   page and see if that helps.
    Otherwise, one other plugin that might help is the
   Sucuri plugin (or WordFence). It will tell you if any files have been modified
   from the core versions, and I think it should flag any missing files as well.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545461)
 * I don’t think your problem is related to the others which are having stalled 
   uploads, but just in case you could try this (if you are still having problems):
   [https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip](https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545524)
 * Hi sorry for my late response,
 * I am currently getting the plugin to run on one of our sites again. It is rather
   slow but seems to be working so far although it claims all the images have been
   previously optimised so I am not seeing savings BUT it appears to be running 
   at the moment

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

The topic ‘Cannot Optimize’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/cannot-optimize/#post-7545524)
 * Status: resolved