Changing the WP CLI cache folder

You could try to change it through the environment variable:

WP_CLI_CACHE_DIR

as we have it included in the WP_CLI::get_cache() method (src):

$dir = getenv( 'WP_CLI_CACHE_DIR' ) ? : "$home/.wp-cli/cache";

You can also check out issue #1848Use shared cache directory for multiple installs for usage examples.

In the WP-CLI Handbook on make.wordpress.org, we have a list of environment variables used by WP-CLI.

Leave a Comment