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.

closed as off-topic by Jacob Peattie, rudtek, bosco, cjbj, Rick Hellewell Apr 11 at 22:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Jacob Peattie, rudtek, bosco, cjbj, Rick Hellewell
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    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.