3

I'm using WP-CLI with Docker, everything works fine but I can't seem to find a way to install plugins that are on my local drive.

I'm following the instructions, and do :

wp plugin install ../assets/plugins/myplugin.zip

I'm expecting WP-CLI to install the plugin, instead I get a :

Warning: Couldn't find '/assets/plugins/myplugin.zip' in the WordPress.org plugin directory.
Error: No plugins installed.

It seems WP-CLI is treating my zip path as a plugin slug from the plugin directory.

I tried quotes, absolute path, running as root, all with the same result.

  • 3
    Are you sure the zip is in a folder mapped into the container? If you map a folder into docker, you can't break out of that folder into the host filesystem with .., especially if assets is in the root folder. Try using an absolute path – Tom J Nowell Oct 10 '18 at 15:39
  • 1
    Duh, you're right ! I wasn't mapping the correct asset folder. Thanks. – mike23 Oct 10 '18 at 16:02

Browse other questions tagged or ask your own question.