Title: Plugin Stopped Working, No Cache , No Image Optimization
Last modified: October 17, 2020

---

# Plugin Stopped Working, No Cache , No Image Optimization

 *  Resolved [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/)
 * Hello,
 * The plugin stopped working. Version 3.5.0.2
 * On Cache tab:
 * WARNING
    LSCache caching functions on this page are currently unavailable! To
   use the caching functions you must have a LiteSpeed web server or be using QUIC.
   cloud CDN.
 * We had already signed up for QUIC.cloud CDN, long ago. Checking on the status
   it says OK. refreshing the domain key says it’s “Approved”.
 * Report number: RWICZKHN
 * Regards,

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13549786)
 * Hi,
 * I don’t see this domain on QC CDN , it shows CDN Disabled
 * for image optimization , it was due to WP REST API call blocked by cloudflare,
   please whitelist our IPs in CloudFlare firewall.
 * [https://quic.cloud/ips](https://quic.cloud/ips)
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13554938)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * We looked at all the IP addresses you gave us (56) and none are being blocked
   by us on Cloudflare.
 * We have also white listed all 56 addresses on Cloudlflare Firewall, see images
   below:
 * > [View post on imgur.com](https://imgur.com/a/TcwEULc)
 * > [View post on imgur.com](https://imgur.com/a/a8kEwLe)
 * We only see one IP as being active from the white list, see images below
 * > [View post on imgur.com](https://imgur.com/a/hAtaNym)
 * > [View post on imgur.com](https://imgur.com/a/uZghbFC)
 * We also tried cleaning up unfinished data, and also manually gathered image data.
 * We still don’t have image optimization.
 * Regards,
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13559896)
 * Hi,
 * Could you please clean up unfinished data and re-send request ? I don’t see anything
   in log at this moment , but your next request should show up
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13560118)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Cleaned Up Unfinished Data and re-sent the request
 * Response : “Pushed 43 images to Cloud server, accepted 43 images”.
 * But no image optimization showing up.
 * Regards
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13560145)
 * Hi,
 * from log I am seeing blocked by CF at least, or even possibly from your origin
 * ![](https://i0.wp.com/www.litespeedshare.net/2020/10/5d8215-ScreenShot2020-10-
   21_03.23.01.png?ssl=1)
 * the 1005 is Cloudflare’s error code , 403 is probably from your origin.
 * Please check
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13560175)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * This looks like the same situation we had 4 months ago and you were able to help
   us here.
    We have a restricted Rest API.
 * You wrote:
 * “For your situation , we added a new API. Please upgrade to v3.2.3 RC2 or wait
   for new release.”
 * See the full information below:
 * [https://wordpress.org/support/topic/image-optimization-not-working-3/](https://wordpress.org/support/topic/image-optimization-not-working-3/)
 * Regards,
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13579109)
 * Hi,
 * is this still the code you use ?
 *     ```
       //Restricts REST API Access With LiteSpeed Cache Modification
       add_filter( ‘rest_authentication_errors’, function( $result ) {
       if ( ! empty( $result ) ) {
       return $result;
       }
       if ( ! is_user_logged_in() && ( ! defined( ‘LSCWP_V’ ) || ! apply_filters( ‘litespeed_is_from_cloud’, false ) ) ) {
       return new WP_Error( ‘rest_not_logged_in’, ‘You do not have sufficient permission to access this endpoint. Access to REST API requests is restricted.’,
       array( ‘status’ => 401 ) );
       }
       return $result;
       });
       ```
   
 * meanwhile , please make sure our IPs are whitelisted in cloudflare
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13585538)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * This is the code we are using, it has been working for months with no issues:
 *     ```
       //Restricts REST API Access With LiteSpeed Cache Modification
           add_filter( 'rest_authentication_errors', function( $result ) {
               if ( ! empty( $result ) ) {
                   return $result;
               }
               if ( ! is_user_logged_in() && ( ! defined( 'LSCWP_V' ) || ! apply_filters( 'litespeed_is_from_cloud', false ) ) ) {
                   return new WP_Error( 'rest_not_logged_in', 'You do not have sufficient permission to access this endpoint. Access to REST API requests is restricted.', 
                   array( 'status' => 401 ) );
               }
               return $result;
           });
       ```
   
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13630147)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * it has been a while since I have asked for help with this issue. This is also
   affecting our other site with an enterprise LiseSpeeed server. Can you please
   help?
 * Regards,
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13649815)
 * Hi,
 * Apologize for late response.
 * please change this code from
 *     ```
       //Restricts REST API Access With LiteSpeed Cache Modification
           add_filter( 'rest_authentication_errors', function( $result ) {
               if ( ! empty( $result ) ) {
                   return $result;
               }
               if ( ! is_user_logged_in() && ( ! defined( 'LSCWP_V' ) || ! apply_filters( 'litespeed_is_from_cloud', false ) ) ) {
                   return new WP_Error( 'rest_not_logged_in', 'You do not have sufficient permission to access this endpoint. Access to REST API requests is restricted.', 
                   array( 'status' => 401 ) );
               }
               return $result;
           });
       ```
   
 * to
 *     ```
       //Restricts REST API Access With LiteSpeed Cache Modification
           add_filter( 'rest_authentication_errors', function( $result ) {
             error_log("\nstart1\n",3,"/path/to/your/public_html/lscwp.log");
             error_log( is_user_logged_in()  , 3, "/path/to/your/public_html/lscwp.log");
             error_log("\nend1\n",3,"/path/to/your/public_html/lscwp.log");
   
             error_log("\nstart2\n",3,"/path/to/your/public_html/lscwp.log");
             error_log( LSCWP_V , 3, "/path/to/your/public_html/lscwp.log");
             error_log("\nend2\n",3,"/path/to/your/public_html/lscwp.log");
   
             $is_from_cloud = apply_filters( 'litespeed_is_from_cloud', false );
   
             error_log("\nstart3\n",3,"/path/to/your/public_html/lscwp.log");
             error_log( $is_from_cloud , 3, "/path/to/your/public_html/lscwp.log");
             error_log("\nend3\n",3,"/path/to/your/public_html/lscwp.log");
   
               if ( ! empty( $result ) ) {
                   return $result;
               }
               if ( ! is_user_logged_in() && ( ! defined( 'LSCWP_V' ) || ! apply_filters( 'litespeed_is_from_cloud', false ) ) ) {
                   return new WP_Error( 'rest_not_logged_in', 'You do not have sufficient permission to access this endpoint. Access to REST API requests is restricted.', 
                   array( 'status' => 401 ) );
               }
               return $result;
           });
       ```
   
 * replace “/path/to/your/public_html” to your actual path
 * then try optimize an image , after it fails , check the lscwp.log
 * it should log something.
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13690490)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/) .
 * I implemented the code you have suggested. No image optimization took place.
 * The lscwp.log only shows the following information after 6 hours
 * start1
 * end1
 * start2
    3.5.2 end2
 * start3
 * end3
 * start1
 * end1
 * start2
    3.5.2 end2
 * start3
 * end3
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13693102)
 * Hi,
 * I tested the code I provided and it works on my site.
 * I checked again in the log:
 * > [domain_id] xxx [site_url] [http://www.dr__ko_ter.com[err]](http://www.dr__ko_ter.com[err])
   > Notify failed: error code: 1005
 * CloudFlare is blocking it.
 * Our IPs has been updated , could you please double check the all IPs are up-to-
   date ?
 * And if possible , please try it with CloudFlare proxy disabled.
 * this way we can at least narrow down if issue is from CF or from your origin.
 * Best regards,
 *  Thread Starter [lechon](https://wordpress.org/support/users/lechon/)
 * (@lechon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13697952)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * We are currently checking all the new IPs that you have mentioned, one by one.
 * What is the user agent that LiteSpeed uses when requesting images from a site?
 * We have a wide variety of user agents that are banned at Cloudflare and we want
   to make sure that this not what is causing the problem. For example user agents
   like RestSharp, AHC and many others are blocked at Cloudflare.
 * Let us know,
 * Thanks
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13705205)
 * Hi,
 * It should be `QUIC.cloud image optimization`
 * Best regards,
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13747625)
 * Hi,
 * I’m going to mark this topic “Resolved”, due to lack of activity.
 * If you still need help, please feel free to re-open it.
 * Best regards,

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

The topic ‘Plugin Stopped Working, No Cache , No Image Optimization’ is closed to
new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 15 replies
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/plugin-stopped-working-no-cache-no-image-optimization/#post-13747625)
 * Status: resolved