Global WP-CLI update folder

Any chance of using a universal WP-CLI update folder that can be accessed globally by installed sites. Right now it is on per site basis when updating plugins/themes.

Hi Rotsen,

Are you wanting to share the WP-CLI cache folder across sites?

If so, I’ve personally never tried it but you will probably be able to do this with the Volumes add-on. See https://github.com/getflywheel/local-addon-volumes

Yes, That way updated themes/plugins will be available for all sites. Checking on it!

Thanks!

1 Like

What’s the path of wp-cli folder? I can’t seem to locate it :smiley:

Can you post an example of how you did this in the past? I’ve never heard of sharing WP-CLI’s cache across sites.

I just want to make sure I’m providing the right advice. :slight_smile:

When using Scotch Box or webhosts that supports it, WP-CLI adds a folder usually ~/.wp-cli and updates will be pulled from that directory for all sites installed.

Aha, TIL!

The WP-CLI cache directory in every site container is /root/.wp-cli/cache

When using the Volumes add-on, you’ll set the “Host Source” to the folder of choice on your Mac/PC and then the “Container Destination” needs to be /root/.wp-cli/cache.

Once you do that for all of your Local sites, the WP-CLI cache should be shared and you should see the files appear in “Host Source” folder you specified earlier. :smiley:

1 Like

Awesome, Thanks for the help. :smiley:

1 Like