How to fix composer is not recognized as an internal and external Command Error in Terminal
625 views
Jun 7, 2025
Buy the full source code of application here:
View Video Transcript
0:00
uh hello guys uh welcome to this video
0:03
So in this video I will show you that
0:05
how to fix this error message if you
0:08
type composer inside your terminal And
0:11
if you are getting this error message
0:12
that composer is not recognized as an
0:15
internal or external command If you're
0:17
seeing this error message then in this
0:19
video I'll show you how to fix this Uh
0:22
I'm assuming that you have installed
0:24
composer Composer is nothing but it's a
0:26
dependency manager for your PHP
0:29
applications similar to node So if you
0:32
haven't installed it then definitely go
0:34
to this website click on download and
0:36
download the installer file which is
0:38
composer
0:39
setup.exe I've already installed it but
0:42
I can't access it in the terminal So for
0:45
for uh fixing this you need to go to the
0:49
location where composer is installed So
0:51
by default it's stored in the C drive Uh
0:56
there is a folder called as pro program
0:59
data By default it's hidden So it will
1:02
appear like this program data just
1:05
outside just below the program files
1:07
folder Just open this folder and right
1:10
here you will find out a folder called
1:12
as composer setup So this is your folder
1:16
right here composer setup Just open this
1:20
and just go to the bin
1:22
directory and these are your composer
1:25
files right here Bad file right If you
1:28
try to open command line here type the
1:31
same command
1:32
composer So it will give you this uh new
1:36
error which is PHP is not recognized as
1:39
an internal or external command Just
1:41
make sure that PHP is also stored inside
1:44
the path variable as well because
1:47
composer is dependent upon PHP So that's
1:50
why
1:53
So what you need to do first of all
1:56
right click copy this entire
1:58
path Just open environment
2:02
variable and uh go to system
2:05
variable Just select
2:08
path Add this entry paste this entire
2:12
path Okay Okay Okay And also you need to
2:15
add the path for the PHP So for PHP I'm
2:19
using exam control panel I'm assuming
2:23
that is so exam comes with the Apache
2:27
server MySQL
2:28
database So Examp is a very po
2:32
uh popular software for
2:35
PHP for downloading PHP as a local
2:39
software So if you are using exam then
2:43
perfectly okay So wherever you install
2:45
PHP by default it's stored inside the C
2:48
drive in the case of exam So there is a
2:52
folder PHP folder if you
2:55
see and
2:57
just also add this folder as well Right
3:01
click uh copy this location also add
3:04
this folder Again repeat the same
3:07
process Open environment
3:09
variable and go to system
3:13
variable select
3:15
path and paste this location So you will
3:19
see you need to paste two paths here
3:22
First of all for the composer second for
3:24
the PHP And just now okay Okay Just
3:26
restart the terminal and just type the
3:29
same command here Composer So now you
3:33
will see the composer command will
3:34
perfectly work So in this easy way you
3:38
can fix this error message also the PHP
3:41
command will also work So in this easy
3:44
way guys you can fix this error message
3:46
Just follow the step-by-step process and
3:49
also check out my website
3:50
freemediatools.com
3:52
uh which contains thousands of tools
3:54
regarding audio video and image And I
3:56
will be seeing you in the
#Programming
#Software