Wordpress LScache Plugin: Disable CDN for AMP
Last Updated on: Wed, 15 Apr 2026 00:00:02 How do I disable the cdn settings on AMP pages? I upgrade to v3.2.4 and i add following code into wp-config.php if (function_exists( is_amp_endpoint ) && is_amp_endpoint()) define( LITESPEED_BYPASS_CDN, true ) and purge all cache But it does not work Hi, Could you please try use define( LITESPEED_BYPASS_CDN, true ) directly, and see if you get CDN URL in amp page ? and it above code works , as it disables CDN for all pages , then please try below if (function_exists( is_amp_endpoint ) && is_amp_endpoint()) exit does it give you blank page ? or loading as normal ? Best regards, define( LITESPEED_BYPASS_CDN, true ) It works Putting: if (function_exists( is_amp_endpoint ) && is_amp_endpoint()) exit in wp-config the AMP page signals to be seen, even after clearing the cache. I think thats the problem Hi, in wp-config the AMP page signals to be seen, even after clearing the cache. I think thats the problem I didnt understand , did you see the white/blank page ? Best regards, No I dont see the white / blank page in amp by entering that code Hi, OK , then please contact AMP plugin support its their is_amp_endpoint function not working. Best regards, This is the answer that gave me support. How can I do? https://wordpress.org/support/topic/is_amp_endpoint-does-not-work-in-wp-config/ Hi, OK , here is a quick workaround , less sophisticated it may not be perfect, but it should work , add this to wp-config.php if (strpos($_SERVER[REQUEST_URI],amp) !== false) define( LITESPEED_BYPASS_CDN, true ) Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference