Header Ads

How to install Composer in Windows

Today,We will learn how to install Composer in windows PC.Composer is the php environment that helps to develop specially laravel based web application.It is one of the leading PHP framework, which is also used for the development of WP theme.



 

  • First of all ,you have download php package from this link


http://windows.php.net/download/




  • Extract this compressed file by creating folder named PHP in the local directory C:.

  • Next step is to download composer executable file from this link.


https://getcomposer.org/download/




  • In the second step,execute the setup file and select the install path when setup asked to located php.exe.


i.e c://php/php.exe




  • Now,download the composer file using the following steps

    Command-line installation


    Run this in your terminal to get the latest Composer version:


 

 

 


  1. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

  2. php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

  3. php composer-setup.php php -r "

  4. unlink('composer-setup.php');"



This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then               download the latest composer.phar in the current directory. The 4 lines above will, in order:

  • Add the php path in the Windows  Environment variables path.

  • Enter the following command



C:\Users\Server>php composer-setup.php 


C:\Users\Server>php composer-setup.php --filename=composer


echo @php "%~dp0composer.phar" %*>composer.bat


  • Open Termianal and type composer init

  • Fill up the necessary Information

  • Now,its time to download laravel packages from the remote server,Type the following command




  1. C:\Users\Server>composer create-project laravel/laravel <project name>i.e cms



 

Now,The packages is ready to develop laravel based web application.You can customize the package using text editor like sublime text editor or PHPstrome editor

 
How to install Composer in Windows How to install Composer in Windows Reviewed by Ashok on Friday, September 08, 2017 Rating: 5

No comments

Recent Posts