PHP, Tips, Tutorials, Wamp

‘PHP’ is not recognized as an internal or external command

26 March 2019

when running “php” command in command prompt it gives an error like

‘php’ is not recognized as an internal or external command, operable program or batch file.

here is a solution of this problem in windows:

    1. Go to Control Panel > System and Security > System
    2. Go to Advanced System Setting


  • click on Path variable we’ll see following screen.then Add path to your php in PATH Environment Variable.


For Example:

  • Then Close your Command Prompt And Restart Again.



Important: It’s very important because if you didn’t restart your command prompt then changes will not be reflected.

That’s All.

Now you can check your php version from command prompt using this command :
php -v.


Leave a Comments