Skip to content

Using via LiteSpeed API

LiteSpeed Cache for WordPress provides API filters and hooks that allow those familiar with PHP to customize for their own plugins or for personal use.

There are two types of API filters available for

  • Cloud, which allows you to check the origin of a callback request
  • Optimize, which lets you control certain aspects of the page optimization services

Because the API that comes with LSCWP is by design a WordPress function, we have only provided an overview here. Full documentation of the available LiteSpeed and API filters can be found in our WordPress plugin documentation.


As of this writing, there is only one Cloud filter available, and its purpose is to determine whether a callback request is coming from a CDN node. The filter can be used to reject callbacks from unauthorized servers.

Please see LSCWP API Cloud for more details.


As of this writing, there are filters available to execute the following Optimization tasks:

  • Set a custom path for Critical CSS files
  • Set a custom path for Unique CSS files
  • Generate only a single UCSS file for a particular post type
  • Bypass UCSS for a particular post type

Please see LSCWP API Optimize for more details.

Last update: January 26, 2024