Press "Enter" to skip to content

Solved: PHP is not recognized as an internal or external command in CMD

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)

PHP is not recognized as an internal or external command in CMD

On your Windows Start Menu, ‘search for Enviorment variables’

PHP is not recognized as an internal or external command in CMD
  • On Environment Variables, Select Path
  • Edit Path
PHP is not recognized as an internal or external command in CMD

On New button, add your path to php.

PHP is not recognized as an internal or external command in CMD

OK.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *