• Resolved coccoinomane

    (@coccoinomane)


    Hi!

    I very much liked the feature you introduced to purge the cache using the public function sg_cachepress_purge_cache().

    However, when I wrote a simple SSH script to purge the SiteGround cache via terminal from my local computer, it didn’t work.

    I investigated and found that the function sg_cachepress_purge_cache() returns immediately when called from the command line:

    if ( $sg_cachepress_supercacher->environment->is_using_cli() )
    return;

    Is there a reason for this limitation?

    Best wishes,
    Guido

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter coccoinomane

    (@coccoinomane)

    Hi,

    Maybe you missed this ticket? I am sorry to insist, but the ability to purge the cache via command line would be quite useful to our web agency.

    Thank you,
    Guido

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    I will look into it and get back to you asap.

    Did anything ever come of this? A command line method would be great. We’d like to be able to create a cron job to purge at specific times.

    Thanks!

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    The wp-cli command is introduced in the latest plugin version! You can use ‘wp sg purge’ to clear the cache ??

    Thread Starter coccoinomane

    (@coccoinomane)

    Thank you Hristo, I’ll try the new command!
    Have a nice day,
    Guido

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Purge cache from the command line’ is closed to new replies.