• Resolved Matthew

    (@mwhardesty)


    As a user, I want to be able to trigger the fvm_purge_all() function via the WP CLI so I can use it to clear cache during automated deployments.

    Context:
    We have a couple projects that use the plugin now, but are hesitant to add it to others since it introduces manual work into our CI pipeline. Automating the deployment is preferable to logging into the WordPress dashboard to clear FVM’s cache after each deployment.

    Is there any chance of this happening? That would be great!

    Thanks in advance!

    Meta info for others that might be looking for the same thing:
    WP_CLI::add_command()
    https://wp-cli.org/#extending
    https://github.com/wp-cli/scaffold-package-command

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Raul P.

    (@alignak)

    This is actually a good idea and I use wp-cli extensively.
    Will do this on a next update.

    As long as it’s not part of wp-cli, just do the following in your console:

    php -r "require_once( 'web/wp-load.php' ); wp(); fvm_purge_all();"

    Perfect for a deploy script or sth. similar.

    • This reply was modified 6 years, 10 months ago by shihan.
    • This reply was modified 6 years, 10 months ago by shihan.

    You should actually be able to do a simple wp eval 'fvm_purge_all();'

    Plugin Author Raul P.

    (@alignak)

    This was added on 1.3.0, usage is:

    wp fvm purge (to clear the cache)
    wp fvm stats (to check the space)

    Thread Starter Matthew

    (@mwhardesty)

    Awesome, thanks very much!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Request: Extend WP CLI to include fvm_purge_all()’ is closed to new replies.