• Resolved shoulders1024

    (@shoulders1024)


    I have tried many different variations of this cron command but it never works, the current itteration gives this error:

    Error: Not specified what to flush

    The cron I am using is

    /usr/local/bin/ea-php83 /home/myaccount/wp-cli.phar --path=/home/myaccount/public_html w3-total-cache flush page --post_id=816

    Can someone give me the correct command as I the instructions in the code are not the clearest for me.

    Notes

    The wp-cli.phar is present and seems to be called correctly.

    I am trying to clear a specific page with a CRON. This page has Google reviews on it that I have a plugin which updates them.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @shoulders1024

    Thank you for reaching out, and I am happy to help!

    Below is the CLI command to call cache flush

    wp w3-total-cache flush <cache> [--post_id=<id>] [--permalink=<post-permalink>]
    

    You added page after the flush in this case.
    Can you try without this?
    Thanks!

    Thread Starter shoulders1024

    (@shoulders1024)

    using

    /usr/local/bin/ea-php83 /home/myaccount/wp-cli.phar --path=/home/myaccount/public_html w3-total-cache flush --post_id=816

    I got the response

    usage: wp w3-total-cache flush <cache> [--post_id=<id>] [--permalink=<post-permalink>]

    thanks

    • This reply was modified 7 months, 3 weeks ago by shoulders1024.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @shoulders1024

    Just to confirm you got the success?

    Thanks!

    Thread Starter shoulders1024

    (@shoulders1024)

    no success, just an error message telling me the usage of the command indicating that the command I used was wrong

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @shoulders1024

    Thank you for your feedback

    Please try $ wp w3tc flush post –post_id=1 (example)

    So use post instead of the page. The response was:

    Success: The page is flushed from cache successfully.

    Let me know if it helps!

    Thanks!

    Thread Starter shoulders1024

    (@shoulders1024)

    that worked, i assume the page is actually flushed because I got the response

    Success: The page is flushed from cache successfully.

    should the command instruction be written as follows:

    usage: wp w3-total-cache flush ( [all] | [post --post_id=<id>] | [page --permalink=<post-permalink>] )

    thanks for the help, i will add this to my notes.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @shoulders1024

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

    Thread Starter shoulders1024

    (@shoulders1024)

    is it a bug that when i flush using the <post> option as above it comes back and says

    Success: The page is flushed from cache successfully.

    However, the item being flush is actually a page. I think this particular function needs a little bit of a tidy up, especially the instructions/syntax at the top of the function.

    I will sort out a review shortly. Thanks again.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Cannot get my page cron too work’ is closed to new replies.