• Resolved K.H.R

    (@khrifat)


    Hi @qtwrk I want to purge all cache every 3 days automatically. Is there any Schedule System or How can I set up Cron Job to do that?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I am not qtwrk, but I also can tell you that cache plugin doesn’t have such feature. But with a few lines of code it is possible to do that? Are you interested in to get it?

    Plugin Support qtwrk

    (@qtwrk)

    create a php file , like purge.php , put it at same dir as your wp-config.php

    with code :

    <?php
    require( './wp-load.php' );
    if ( defined('LSCWP_V')) {
      do_action( 'litespeed_purge_all' );
      echo 'done';
    }

    then create a cron job from your server to curl/wget it

    Plugin Support qtwrk

    (@qtwrk)

    you can easily improvise it

    e.g. http auth , localhost IP restriction , secret file name , query string verification …etc

    Thread Starter K.H.R

    (@khrifat)

    Thank you @qtwrk

    It would be great, if we get this Schedule Cache Purge feature in next update. Is it possible.??

    Thread Starter K.H.R

    (@khrifat)

    Hi @qtwrk, I have restricted the File as you suggested. Is this CRON Command OK?

    wget -q -O - https://example.com/purge.php >/dev/null 2>&1

    Also, How do I know/check this is purging correctly/on time?

    Thanks for your Advice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Schedule Purge CRON Job’ is closed to new replies.