Troubleshooting

Caching plugins (WP Rocket, LiteSpeed, SiteGround Optimizer)

Keep the Promptor chat working with WP Rocket, LiteSpeed Cache and SiteGround Optimizer by protecting its scripts, security tokens and AJAX requests.

Caching makes your site fast by serving a saved copy of each page. The Promptor chat is dynamic: it talks to your server in real time. Most of the time the two work together without any changes, but aggressive caching or JavaScript optimization can stop the chat from loading or answering. This page explains why, and what to adjust in WP Rocket, LiteSpeed Cache and SiteGround Optimizer.

How the chat talks to your site

Knowing this helps you set the right exclusions:

  • Requests go through admin-ajax.php. Questions, feedback votes, lead forms, handoff events, add-to-cart and the Pro coupon chip all go to /wp-admin/admin-ajax.php with actions named promptor_…. The chat does not use the REST API (/wp-json/). The only Promptor REST route is the Pro MCP server (/wp-json/promptor/v1/mcp), which is for AI tools signed in as an administrator, never for visitors, and sends Cache-Control: no-store.
  • Security tokens are printed into the page. WordPress protects these requests with nonces: short-lived tokens that Promptor writes into the page's HTML. WordPress nonces are valid for roughly 12 to 24 hours.
  • Scripts load only where needed. Promptor loads its scripts on pages that contain its shortcode or the Promptor Chat block, or, when the Pro popup is on, on every page its page targeting allows. The main file is public/assets/js/promptor-public.js inside the plugin folder, with helper scripts in public/assets/js/modules/.
  • Widget translations ride on wp-i18n. Since 2.1.0 the chat's texts in your language are added inline after WordPress's own wp-i18n script.
  • Updates bust caches by themselves. Promptor adds the file's modification time to its CSS and JavaScript URLs, so a plugin update loads fresh files.

What can go wrong

SymptomLikely cause
The chat works for you but not for visitors, or works after clearing the cache and fails a day laterA cached page still contains old security tokens
"Security verification failed. Please refresh the page and try again." on the lead form or Add to CartSame: an expired token in a cached page
"Configuration error. Please contact administrator."The chat's settings script was removed, delayed or combined in the wrong order
The chat box is empty, or nothing happens on AskPromptor's JavaScript was delayed or combined so it no longer runs correctly
Some chat buttons or labels are in English on a translated siteThe inline translations after wp-i18n were delayed, combined or served from an old cache
Answers appear all at once instead of word by wordYour host or CDN buffers the response; Promptor falls back automatically. No action needed

Promptor has no built-in integration with any caching plugin. The steps below are precautions based on how the chat works. Apply them if you see the symptoms above, or up front on sites with long cache lifetimes or the Pro popup on many pages.

General precautions (any caching plugin)

  1. Never cache admin-ajax.php. Most caching plugins already skip it. Check that you have not added it to a "cache this" rule.
  2. Keep cached pages younger than about 10 hours on pages with the chat, so the tokens inside them are still valid. Alternatively, exclude those pages from the page cache.
  3. Exclude Promptor's scripts from delay, defer and combine. Minifying them is usually fine.
  4. Clear the cache after you add the shortcode to a page, change Promptor's appearance or update the plugin.

To find the exact script path, look in wp-content/plugins/ for Promptor's folder. For the free plugin it is promptor, so the scripts are under /wp-content/plugins/promptor/public/assets/js/. Pro may use a different folder name.

WP Rocket

  1. Go to Settings › WP Rocket › Cache and check Cache Lifespan. Keep it at 10 hours or less.

  2. If the chat is on a few pages only and problems continue, go to Advanced Rules › Never Cache URL(s) and add those pages (for example /contact/), one per line.

  3. Go to File Optimization. If Combine JavaScript files is on, add the Promptor script path to Excluded JavaScript Files, one entry per line, for example:

    /wp-content/plugins/promptor/public/assets/js/(.*).js
    
  4. If Delay JavaScript execution is on, add these entries to its exclusion list, one per line:

    /wp-content/plugins/promptor/
    promptor_data_
    promptor_public
    promptor_woo_assistant
    

    The last three keep the inline settings that Promptor prints into the page (promptor_woo_assistant appears only on Pro shops). If chat texts show in English on a translated site, also exclude /wp-includes/js/dist/i18n so the translations load with it.

  5. If Load JavaScript deferred is on and the chat fails, add the Promptor path to its exclusions as well.

  6. Click Save Changes, then Clear and preload cache.

LiteSpeed Cache

  1. Go to LiteSpeed Cache › Cache › TTL. Default Public Cache TTL is often a week or more. On pages with the chat, cached copies that old will carry expired tokens.
  2. Either lower the TTL, or go to Cache › Excludes and add your chat pages to Do Not Cache URIs, one per line.
  3. Go to Page Optimization › Tuning. Add the Promptor path (/wp-content/plugins/promptor/) to JS Excludes and to JS Deferred / Delayed Excludes. Add promptor_data_, promptor_public and promptor_woo_assistant to the delayed exclusions too if inline scripts are delayed.
  4. Save, then purge all caches from the LiteSpeed menu in the admin bar.

If your host also runs a CDN or the LiteSpeed server cache, purge that too.

SiteGround Optimizer (Speed Optimizer)

SiteGround caches pages on the server with Dynamic Caching, managed from the SiteGround plugin (now called Speed Optimizer) and from Site Tools.

  1. In WordPress, open Speed Optimizer › Caching. If the chat fails on cached pages, add your chat pages under Exclude URLs from Caching.
  2. Open Frontend Optimization › JavaScript.
  3. If Combine JavaScript Files is on, open its exclusion list and select Promptor's scripts.
  4. If Defer Render-blocking JavaScript is on and the chat fails, exclude Promptor's scripts there too.
  5. Minification can stay on. If you suspect it, exclude Promptor's scripts from Minify JavaScript Files as a test.
  6. Purge the cache with Purge SG Cache in the admin bar.

SiteGround's exclusion lists show scripts that are loaded on your home page. If the chat is on another page, the Promptor scripts may not appear in the list. In that case, exclude the chat page from caching instead (step 1).

Test after every change

  1. Clear all caches (plugin, server and CDN).
  2. Open the chat page in a private window, logged out.
  3. Ask a question, give a thumbs-up and send a test lead. If human handoff is on, click Talk to a human and pick a channel.
  4. Repeat the next day: problems caused by expired tokens show up only after the cache has aged.

Still need help?

Our support team answers every ticket. Tell us your WordPress version, Promptor version and what you see.

Read the FAQSee what changed in each version

Open a support ticket

All help topics