1

I'm working on a wordpress skeleton for practice. I've got a Composer project and installed the wp-cli/wp-cli dependency.

I want to create and run custom tasks with this wp-cli, for example to download the core of WordPress into this project. This because I'm not putting the core of wordpress into my git repository.

Because I have installed the wp-cli/wp-cli dependency only in my project and not globally over my local machine, I can't run the wp ... commands a normal terminal.

For my own research, I found out that I can use the Command Line Tool Support plugin in my IntelliJ IDE. With this plugin I can use the composer dependency to run commands with the wp-cli. I don't think this is the right solution, because everyone might have a different IDE and/or operating system.

How can I run wp-cli commands over the installation over Composer?

Bas
  • 2,106
  • 5
  • 21
  • 59

1 Answers1

1

Instead of running commands with /vendor/bin/wp ..... I found out I have to replace the / with a \.

To run commands from this binary, this syntax should be used like:

vendor\bin\wp ...

Bas
  • 2,106
  • 5
  • 21
  • 59
  • Is there any particular reason you are insisting from running wp-cli from composer rather from the machine? Since it is terminal command program that has access to create files and modify files why not install it on the machine. – pensebien Sep 08 '20 at 02:14