If you have already installed Wampserver or Xamp, but you still get this error “PHP is not recognized as an internal or external command” in Command prompt or windows power shell, composer, etc.
Try below method to solve this error.
Just copy your php location on your Wamp or Xamp.
That may be:
On Xamp: C:\xampp\php
On Wamp: C:\wamp\bin\php\php5.5.12 (version may change)
On your Windows Start Menu, ‘search for Enviorment variables’
- On Environment Variables, Select Path
- Edit Path
On New button, add your path to php.