Was getting lots of issues installing, so installed Magento2 via Softaculous Installer in CPanel. Installed successfully and site & admin is accessible.
NOW, however, wanting to do things via CLI access, but always get "magento: command not found" when trying to run any of the commands.
Few questions having trouble finding answers for:
- In order to have access to CLI 'magento' commands, did I have to do the initial installation via composer or CLI to start?
- Is there any way to take the fresh working installation instance I have and enable the CLI magento commands without uninstalling and starting over? (Because was having a difficult time getting a stable, successful installation completed through doing CLI or Composer installation) – Although when I did have success a couple of times in the past (before I did something dumb to wack it up beyond my patience for troubleshooting, then deciding to start fresh again…) I DID get access to the Magento commands in CLI, and think they will ultimately prove to be an imperative asset in the future development of this project. :-/
Thanks in advance for any feedback here. Have worked on a couple of projects in Magento 1.*+ in the past, but really want to start this new project off in the new platform.
Best Answer
I do not know if you did actually try to execute it with the php library.
For example my mistake on local OSX:
bin zarun$ magento -bash: magento: command not found
But it is actually supposed to be:
bin zarun$ php magento
Of course take a look at the available commands using the list option:
bin zarun$ php magento list