Language:

Search

How to Install Composer Manually

  • Share this:
How to Install Composer Manually

Introduction

Manually Installing composer is an advanced technique, however there are several reasons why a developer might prefer this reason instead of using the interactive installation routine. The interactive installation checks your PHP installation to ensure that:

  • Sufficient version of PHP is being installed on your machine
  • .phar files are executable
  • Certain directory permissions are sufficient
  • Certain php.ini settings are set

Since manual installation performs none of these checks. Below is how you can install composer manually on your machine.

curl-shttps://getcomposer.org/composer.phar-o$HOME/local/bin/composer
chmod+x$HOME/local/bin/composer

The Path

You can simply chose your path whether it be $HOME/local/bin or any directory of your choice. But one thing to make sure is, it should be in your $PATH variables. This will allow the composer command being available.

Is that it?

Yes, it is. Now you can run composer in your machine globally.

Running Composer

For running composer from inside of any directory. Simply type

composer install

 

Usama Muneer

Usama Muneer

A web enthusiastic, self-motivated & detail-oriented professional Full-Stack Web Developer from Karachi, Pakistan with experience in developing applications using JavaScript, WordPress & Laravel specifically. Loves to write on different web technologies with an equally useful skill to make some sense out of it.