Title: Litespeed adding script in AMP
Last modified: September 20, 2021

---

# Litespeed adding script in AMP

 *  Resolved [srinivasr2007](https://wordpress.org/support/users/srinivasr2007/)
 * (@srinivasr2007)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/litespeed-adding-script-in-amp/)
 * Litespeed is adding a script in the AMP version and due to this google is saying
   invalid amp page. Could you please let me know what is the issue over here?
 * I have added “/amp/ in the Page Optimization–>tuning–>URL excludes
    also inside
   Cache–>Excludes–>Do Not Cache URIs
 * Page URL –
    [https://itsmycode.com/python-string-isalpha/amp/](https://itsmycode.com/python-string-isalpha/amp/)
 * Google AMP saying invalid URL –> [https://search.google.com/test/amp?id=ed0yNgqmNgZizN_Hqi3ZDQ](https://search.google.com/test/amp?id=ed0yNgqmNgZizN_Hqi3ZDQ)
    -  This topic was modified 4 years, 8 months ago by [srinivasr2007](https://wordpress.org/support/users/srinivasr2007/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flitespeed-adding-script-in-amp%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/litespeed-adding-script-in-amp/#post-14891568)
 * Hi,
 * please add this to your wp-config.php , next line after <?php
 *     ```
       if (strpos($_SERVER['REQUEST_URI'], "amp") !== false){
       define( 'LITESPEED_DISABLE_ALL', true );
       }
       ```
   
 * purge all
 * Best regards,

Viewing 1 replies (of 1 total)

The topic ‘Litespeed adding script in AMP’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/litespeed-adding-script-in-amp/#post-14891568)
 * Status: resolved