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

GeertvdV's avatar

Moving composer to globally with terminal (to install laravel)

Hello,

I'm trying to install laravel to run a project my company made. But first i need composer to run globaly. So i can run composer from everywhere by saying "composer". I've seen people use lines like:

mv composer.phar /usr/local/bin/composer

but i work on windows and i'm stuck.

I cant figure out how to do it. I already looked up some forums for this but i didnt get it or it didn't work.

IMPORTANT: i'm a beginner with this so don't go hard on me if i don't get it right away.

Greetings,

Geert V

0 likes
7 replies
tobyreed's avatar
tobyreed
Best Answer
Level 5

Hello,

I also work on Windows, and I found it very useful to use the package manager called Chocolatey (via powershell) and it has helped me install all the required dependencies and usually puts the stuff you install into the your PATH environment variables, which is where they become "globally" available!

https://chocolatey.org/

1 like
GeertvdV's avatar

@tobyreed Thank you for your help, i'm working with it right now. but now i am at the message: Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[print): -y

How to i repy to yes to all? I don't see what i have to reply haha.

Thanks already, hope to see a reply from you

Greetings,

Geert

nagavinod424's avatar

@geertvdv

i don't get it what you are saying... if you are asking in between installation click "yes" i guess.. u need to specify the php installation path when it asks it is a dependency for composer..

tobyreed's avatar

To reply to all, I think you just do "yes" instead of just "y"! Glad I could help, I am relatively new too!

1 like

Please or to participate in this conversation.