php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program laravel laravel

php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program


Try adding your PHP.exe's folder to your System PATH variables, so PHP can be accessed via terminal.

For example; C:\wamp\bin\php\php5.4.3

To add new PATH variable, follow this:

  1. Right click on My Computer, select Properties
  2. Select Advanced System Settings
  3. In the System Properties window click the Environment Variables button.
  4. Select System Variables -> PATH and click Edit.
  5. Enter the folder where your PHP.exe is located.

If you did this correctly, restart your terminal and type php --version to check if it works.

Note: Don't forget to seperate paths by using ; seperator.


it's quite simple man, maybe you forgot to type "php" first before you type your php name, for example is our php file name is youcan.php . If you wanna open it on your cmd/powershell you gotta type "php youcan.php" thats my own experience, may it can help you brother.