Changing the WP CLI cache folder
As a highly concerned hosting company owner I am using WP-CLI to update plugins, themes and wp core of my clients.
Updating WP-Core
find /home/*/public_html -name "wp-admin" -execdir /home/wp core update --allow-root \;
Updating Plugins
find /home/*/public_html -name "wp-admin" -execdir /home/wp plugin update-all --allow-root \;
Updating Themes
find /home/*/public_html -name "wp-admin" -execdir /home/wp theme update-all --allow-root \;
Everything is working extremely well, but I want just to change CACHE folder for WP-CLI since I do not want it to store in /root/wp-cli/.cache
It's actually not storing anything there because I enabled Open base dir, how can I change location of cache folder for wp cli? is there a syntax? I can't find any docs on it
PHP Warning: file_exists(): open_basedir restriction in effect. File(/root/.wp-cli/cache/) is not within the allowed path(s): (/home:/tmp:/opt/cpanel/composer/bin/composer) in phar:///home/wp/php/WP_CLI/FileCache.php on line 261
I honestly do not know what is cache folder used for but since wp cli can't use it I am just afraid that something will fail, but so far it didn't.
Topic wp-cli shared-hosting maintenance Wordpress
Category Web