Title: Issue with LiteSpeed Cache ESI Implementation
Last modified: September 27, 2024

---

# Issue with LiteSpeed Cache ESI Implementation

 *  Resolved [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/)
 * **Hello LiteSpeed Team,**
 * I’m encountering an issue while attempting to use ESI (Edge Side Includes) in
   LiteSpeed Cache. I’ve tried a simple implementation to test this feature, but
   unfortunately, it doesn’t seem to be working as expected.
 * **Website Link:** [https://lightgoldenrodyellow-camel-873505.hostingersite.com/test-esi/](https://lightgoldenrodyellow-camel-873505.hostingersite.com/test-esi/)
 * **Attachments:** I have provided two screenshots to illustrate the problem.
   [https://ibb.co/bFgfg65](https://ibb.co/bFgfg65)
   [https://ibb.co/mT0xNwW](https://ibb.co/mT0xNwW)
 * **Steps to Reproduce the Issue:**
    1. Installed the LiteSpeed Cache plugin.
    2. Enabled ESI and Cache.
    3. Created a simple plugin to test if ESI works. The plugin code can be found [here](https://ctxt.io/2/AAC4SoFQFQ).
 * **Report Details:**
    - **Report Number:** FUTQKSIZ
    - **Report Date:** 09/27/2024 14:38:38
 * **Additional Information:**
   If there is any other information required or if 
   this could be a conflict with another plugin, please let me know. I’ve attached
   the plugin code used for the ESI test below for your reference.
 * Thank you for your support. Looking forward to your guidance on resolving this
   issue.
    -  This topic was modified 1 year, 8 months ago by [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/).
    -  This topic was modified 1 year, 8 months ago by [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissue-with-litespeed-cache-esi-implementation%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18041403)
 * [@ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/) 
   Hello! Nice
   test done thereThe shortcodes added in page seems correctly written.One problem
   I see: is that it is not recognized(is still text). Might be a good ideea to 
   move `add_shortcode` to action `init`, something like:
 *     ```wp-block-code
       add_action( 'init', 'your_plugin_add_custom_shortcode' );function your_plugin_add_custom_shortcode() {  add_shortcode('test-esi', 'display_esi_test_shortcode');}
       ```
   
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18041414)
 * Thank you for the quick response!
 * I attempted to add the shortcode in the `init` hook as follows:
 *     ```wp-block-code
       add_action( 'init', 'init_for_custom_shortcode' );function init_for_custom_shortcode() {    add_shortcode('test-esi', 'display_esi_test_shortcode');}
       ```
   
 * However, the issue still persists.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18041422)
 * But first turn ESI ON from settings: [https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-tab](https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-tab)
    -  This reply was modified 1 year, 8 months ago by [litetim](https://wordpress.org/support/users/litetim/).
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18041427)
 * Still same issue exists
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18041448)
 * Can you disable other plugins, except LSC and yours?
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18044954)
 * all plugins disabled except LSC and my plugin
   [https://ibb.co/51cFGHT](https://ibb.co/51cFGHT)
    -  This reply was modified 1 year, 8 months ago by [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/).
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045027)
 * The results are the same?
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045039)
 * Yes, result still same
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045115)
 * the code link is not working, please verify
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045134)
 * Please create a ticket by sending email to: support at [litespeedtech.com](http://litespeedtech.com/)
   
   Please add the following notes:`new report numberthis thread linkand ask to be
   assigned to a developer
 * Thank you 🙂
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045145)
 * Check this out
   [https://github.com/aha-xtnd/ESI-Test-Plugin/blob/main/esi-test-plugin.php](https://github.com/aha-xtnd/ESI-Test-Plugin/blob/main/esi-test-plugin.php)
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045583)
 * I see you turned ON ESI on your site. With ESI on the tag dissapears, but content
   do not appear.
   I am looking into the issue, seems a problem on some checks
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18045639)
 * Hello
   Try adding the following change to LSC: [https://github.com/litespeedtech/lscache_wp/pull/704/commits/f01748de3000874e926d4a9154a5fe7c514e2cbc](https://github.com/litespeedtech/lscache_wp/pull/704/commits/f01748de3000874e926d4a9154a5fe7c514e2cbc)
   Please tell me if it works
 *  Thread Starter [ahmedatxtnd](https://wordpress.org/support/users/ahmedatxtnd/)
 * (@ahmedatxtnd)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18047027)
 * I followed your instructions and added the code at the specified file path and
   line, but the issue persists; the problem still exists.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18047122)
 * okay , please create a ticket as Tim asked earlier

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

The topic ‘Issue with LiteSpeed Cache ESI Implementation’ 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
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-litespeed-cache-esi-implementation/#post-18047122)
 * Status: resolved