Code that clears the cache of some pages

@serpentdriver thanks.

header('x-litespeed-purge: /');
header('x-litespeed-purge: /page1/');
header('x-litespeed-purge: /page2/');

Actually this code is ok. But I will use loop for pages. 🙂

You can use only 1 purge header with the same name:

header('x-litespeed-purge: /,/page1/,/page2/');


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer