How to set cron job clear cache Litespeed

Create a php file with content like in root folder web

<?php
require( './wp-load.php' );

if (class_exists('\LiteSpeed\Purge')) {
  do_action('litespeed_purge_all');
  echo "Litespeed flush cache successfuly.";
}

save it with name like purge.php

then curl it with cron job e.g.

curl -I -XGET https://domain.com/purge.php

Leave a Reply

Your email address will not be published. Required fields are marked *