---
url: https://docs.artemsemkin.com/velum/wp/help/caching-plugin-broke-the-site.md
description: >-
  Fix a site that stays blank until you tap, says "gsap is not defined", loses
  its styles or shows grey sliders after you turned on LiteSpeed Cache, WP
  Rocket, Autoptimize or another caching or optimization plugin, with the
  settings tested with Velum and the ones to switch off first.
---

# The site breaks after turning on a caching plugin

After you switch on a caching or optimization plugin, the pages stay blank until you tap, the browser console says `gsap is not defined`, the sliders turn grey or black, or the styles are missing on the live site while the editor looks fine.

Velum marks its own scripts so that LiteSpeed Cache, WP Rocket and Autoptimize leave them out of delaying, deferring and combining, and it keeps its images away from their lazy loaders. The settings below were tested with Velum. When something still breaks, a setting that was not tested, or a script of another plugin, is the likely cause.

## Find the setting that breaks it

#### ▶️ Step 1.

Look at the site as a visitor does: open it in a private window. Caching plugins skip logged-in administrators, so the admin view can look fine.

#### ▶️ Step 2.

Switch the plugin's options off one at a time, starting with the ones in [the untested list](#settings-not-tested-with-velum), and purge the cache after each change: **Purge All** in the LiteSpeed Cache menu of the admin bar, or **Save Changes and Empty Cache** in Autoptimize.

#### ▶️ Step 3.

When the page works again, you have found the setting. Keep it off, or exclude only the script that fails, as described below.

## Settings tested with Velum

These ran on every kind of page of the demo with no error, including page transitions and the sliders.

* **LiteSpeed Cache 7.8.1:** the defaults, **CSS Minify**, **CSS Combine**, **JS Minify**, **JS Combine**, **Load JS Deferred** set to Deferred and to Delayed, **Lazy Load Images**, and the **Basic**, **Advanced** and **Aggressive** presets.
* **Autoptimize 3.1.15.1:** the defaults, **Aggregate JS-files?**, **Optimize HTML Code?** and **Lazy-load images?**.
* **WP Rocket 3.23.3.3:** the defaults with the page cache, **Load JavaScript deferred**, **Delay JavaScript execution**, **Combine JavaScript files**, image and iframe lazy load, and all of these on together.

## Settings not tested with Velum

Switch these off first. They have not been tested with Velum, which does not make them a known cause.

* **LiteSpeed Cache:** **Generate UCSS**, the **Extreme** preset, **Guest Mode** on its own, and QUIC.cloud services.
* **WP Rocket:** **Remove Unused CSS**, **Optimize CSS delivery** and the lazy load of CSS background images.
* **Autoptimize:** the CSS options on their own.
* **Cloudflare Rocket Loader** and a cache on the host's server, such as Varnish.

## The page stays blank until you tap, or the console says "gsap is not defined"

A script was delayed or moved. Switch off the plugin's delay, defer or combine option for JavaScript: **Load JS Deferred** in LiteSpeed Cache, **Delay JavaScript execution** or **Combine JavaScript files** in WP Rocket, **Aggregate JS-files?** in Autoptimize. If that fixes it and you want the option back, exclude the script that the console names instead: **JS Deferred / Delayed Excludes** in LiteSpeed Cache (**Page Optimization → Tuning**), **Excluded JavaScript Files** under **Delay JavaScript execution** in WP Rocket, **Exclude scripts from Autoptimize:** in Autoptimize.

## The sliders are grey or black

An image lazy loader replaced the pictures with a placeholder, and the slider drew the placeholder. Switch off **Lazy Load Images** in LiteSpeed Cache (**Page Optimization → Media Settings**), the image lazy load on the **Media** tab of WP Rocket, or **Lazy-load images?** on the **Images** tab of Autoptimize. If your images come from a CDN, see [The slider is blank when images come from a CDN](./slider-blank-cdn-images).

## The styles are missing on the live site

Switch off the CSS options of the plugin, the untested ones first, and purge. If the live page still looks old, a cache is serving old files: see [The site looks broken after an update](./broken-after-update).

## If none of this applies

Open a ticket on the [support forum](https://artemsemkin.ticksy.com/). Write the plugin's name and version, the setting you changed last, the address of the page and any message from the browser console.
