Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_Johnson's avatar

bash: php: command not found

Hi guys, sorry for the bovva, but the story is that I just recently formatted my pc and pretty much just copied any pasted my project over to a usb from my htdocs and then copied them back over. To the htdocs from a fresh install.

I installed VSCode and Git and am using the gitbash command terminal inside vscode. The problem is that when I try to run an artsian command, specifically

php artisan mirgrate

I am getting the

bash: php: command not found error.

I installed composer etc think something may happen, I did happen to see something in the corner of vscode saying something about php not being linked but then I haven't seen it since I install composer.

Please help, Randy

0 likes
4 replies
gemini_man93's avatar

@grenadecx bro if i add path, wamp server shows error that the server don't need path variable and if i remove path variable the error is fixed but php no recognize. what should i do, (wamp 3.3, php 8.2)

Please or to participate in this conversation.