Connect with us

Featured

How to install composer in Windows

Tisna Adinata

Published

on

How to install composer

Hi, welcome. This is my first blog, since this is my first blog i decide to write about “tool” that is use recently on my project and the easy one i write.

That is Composer, i use composer in my PHP project that require third party library to make the coding process easy. I recommend you to use composer if you need to use “Some one” code to your project that you think you need it and it can be integrated to your project.

So before we jump start we need to know what is composer actually.

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Composer is not a package manager in the same sense as Yum or Apt are. Yes, it deals with “packages” or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it does not install anything globally. Thus, it is a dependency manager. It does however support a “global” project for convenience via the global command.

Composer can be install in Windows, Unix. Linux, or MacOs.

Today i will show you how to install composer in windows machine. Here is the step

First, download the composer installer. For download follow this link https://getcomposer.org/Composer-Setup.exe

After you download, run the installer and click next

How to install composer

After that select default PHP version that you used. For PHP installation i will write on another post

How to install composer
How to install composer

After that if you use proxy on your internet connection you can setting here than click Next

How to install composer
How to install composer

After that you will review your installation, click Next to continue, click Next again than click Finish

How to install composer
How to install composer
How to install composer
How to install composer

Then open CMD to test the composer installation. Type composer on CMD. Oh wait i get error, when type composer if you get message like

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

It is because we did’t register composer in System Path, so to do it open your Windows Explorer (Win + E) then right click on your computer menu like bellow and click properties

How to install composer – open windows explorer

Then copy the composer installation path, by default it locate in
C:\Users{user name}\AppData\Roaming\Composer. After you click properties in previous click Advanced system settings

How to install composer
How to install composer

Then click the Environment Variables, and in System variables section search for path in variable row

[addthis tool=addthis_recommended_horizontal]

How to install composer
How to install composer

After you find the path row, select edit. At the on of the variable value add semi colon and paste the composer installation path. Click Ok, than Ok again and Ok again

How to install composer
How to install composer

And then open CMD again and type composer and chacha,,, you have done the installation

How to install composer
How to install composer

So to install composer in windows machine you need to download and install like other application, but you also need to register composer in System Variable to make composer access globally.

Hi, my name I Wayan Tisna Adi Muliarta. Programmer and blogger who loves share about code.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

10 + twelve =

Trending