If you see a LiteSpeed Cache 403 on JavaScript files or the Imunify360 check page, and the site recovers when you disable LiteSpeed Cache, the cause is in the cache files and not in Imunify360. Usually corrupted JavaScript files have been written to the wp-content/litespeed/js/ folder and these trigger the security rules. Empty all caches, the plugin's, the server's and Redis, and re-enable the optimizations one at a time, leaving JS optimization off if the problem comes back.
What you see when it happens
- Pages that do not display properly, buttons that do not respond, menus or a cart that will not open.
- 403 Forbidden errors on JavaScript files loaded from the
wp-content/litespeed/js/path. - Messages in the browser console that a script was not executed because of its MIME type, for example that it arrived as
text/htmlinstead of JavaScript. This means the browser received an error page in place of the JS file. - The Imunify360 check page, asking you to wait or confirm you are not a bot.
- On an e-shop, the customer does not return properly to the order completion page after paying at the bank, or browsing becomes very slow.
Why 403 forbidden and the Imunify360 page appear
When you enable settings such as JS Minify, JS Combine or Load JS Deferred in LiteSpeed Cache, the plugin creates its own JavaScript files in the wp-content/litespeed/js/ folder. If one of them is written incorrectly, for example truncated or with mixed-up content, Imunify360 may read it as a suspicious request and respond with a 403. It is a false positive, meaning the security rule catches something that is not an attack, but the cause is the corrupted file.
Every page of the site requests these files. Your browser therefore makes many requests that are rejected within a few seconds. Imunify360 may then treat the traffic from your IP as suspicious and show you the check page. If your IP gets blocked, see how to unblock your IP in Imunify360.
The Imunify360 security rules apply to the whole server and protect every site. Konet does not disable them for a single site, because here the fix is to rebuild the cache files correctly. For what Imunify360 does, see Imunify360 in cPanel.
How to tell whether the cache or Imunify360 is to blame
- Temporarily deactivate LiteSpeed Cache from Plugins in WordPress, or open LiteSpeed Cache > Toolbox > Debug Settings and set Disable All Features to ON.
- Open the site in a private window.
- If the site works normally and the 403s stop, the cause is in the cache files or in the optimization settings.
Do not leave the site like this. Without cache the site is slower and puts more load on the account. Move on to the cleanup.
Full cache cleanup, in order
- Turn off JS optimization. In LiteSpeed Cache > Page Optimization, on the JS Settings tab, set JS Minify, JS Combine, JS Combine External and Inline and Load JS Deferred to OFF. Save.
- Empty the plugin cache. Open LiteSpeed Cache > Toolbox, Purge tab. Click Purge All - CSS/JS for the optimization files, then Purge All and finally Empty Entire Cache, which empties the site's entire cache.
- Empty the server cache. In cPanel open the LiteSpeed Web Cache Manager and click Flush LSCache.
- Empty Redis, if you use it. In cPanel open the LiteSpeed Redis Cache Manager and click Flush Cache.
- If you use Cloudflare, clear its cache as well, because it may be holding the corrupted JS files. See clearing the website cache.
- If you deactivated the plugin or set Disable All Features to ON, restore it now.
- Open the site in a private window and check the pages, the cart and the checkout.
Re-enabling, one setting at a time
If the site works correctly after the cleanup, turn the optimizations back on one at a time. After each change click Purge All and check the site from a private window.
- Start with CSS optimization, for example CSS Minify on the CSS Settings tab.
- If you were using it, turn Guest Mode back on under LiteSpeed Cache > General. It serves the first page quickly to new visitors.
- Leave JS optimization for last. If the 403s come back as soon as you enable a JS setting, set it to OFF and leave it off.
On an e-shop, avoid JS Combine. It keeps creating new JavaScript files, fills the account's disk space and increases the chance of a file being written incorrectly. If you want some JS optimization, JS Minify is the mildest option. If a specific script breaks, add it to JS Excludes on the Tuning tab.
What to send in the ticket if the problem continues
If after a full cleanup and with JS optimization off you still see 403s or the Imunify360 page, open a ticket with:
- The page address and the exact steps you take until the problem appears.
- The date and time it happened, as precisely as possible.
- Your public IP at the time of the problem.
- A screenshot of the console and of the Network tab in the browser tools, showing the requests that return errors.
- Anything relevant in the WordPress error log, if you have it enabled.
With these, Konet can find the specific request in the server logs and the reason it was rejected. Most errors of this kind come from the application, meaning a setting, plugin, theme or code. See also what hosting support covers.
Frequently Asked Questions
Imunify360 is blocking the LiteSpeed cache, can you disable it for my site?
No. Imunify360 protects every site on the server. When the site works with LiteSpeed Cache disabled, the cause is the cache files, and a full cleanup fixes it.
Why do I see 403 Forbidden on files in the wp-content/litespeed/js path?
LiteSpeed Cache creates these files when JavaScript optimization is enabled. If one is written incorrectly, it gets rejected. Turn off JS optimization and empty all caches.
What does the MIME type message in the console mean?
The browser expected a JavaScript file and got an error page, usually the 403. It is not a separate problem. It is fixed together with the 403.
E-shop customers do not return properly after payment. Is this related?
It can be. If the scripts on the order completion page do not load, the return from the payment gateway fails. Do the cleanup and test an order from a private window.
It keeps asking me to wait on the Imunify360 page, what do I do?
Complete the check and clean up the cache. If your IP has been blocked, it is unblocked for 24 hours after the captcha check.
What is the difference between Purge All and Empty Entire Cache?
Purge All clears the cache of the WordPress installation and the optimization files. Empty Entire Cache empties the site's entire cache, including other applications on the same domain, and is meant as a last resort.