banner



How To Setup Composer In Windows 10

How to install PHP Composer on Windows 10

PHP Composer (Composer) is a tool that enables the download and installation of various external sources and libraries for projects based on PHP thus information technology also known every bit "Dependency Management Tool". It likewise now helpful considering there are so many open-source projects no longer deliver Goose egg archives or other installation packages – they reference the corresponding GitHub repositories. Thus, Composer makes information technology piece of cake to get-go with PHP project for evolution or production.

PHP Composer installation on Windows 10


Here we volition permit you know how to install Composer for PHP, however, we start with PHP installation on Windows 10 showtime and if you lot already have information technology on your system then you lot tin straight motility to Step 6 of this tutorial.

Pace i: Download PHP on Windows 10 or seven for Composer


So, here I am assuming that you don't take PHP on your Windows x or vii, because to get the Composer on the organisation, it must has the PHP: Hypertext Preprocessor. Therefore, go to the official website and download the zipped file of PHP for Windows.

Download PHP Zipped folder for Windows


To install PHP on Windows, nosotros don't need whatsoever setup. Just go to C: Drive and create a folder php7 and excerpt the above downloaded zipped files of PHP into it. You can employ the default Windows extractor, Winzip or any other tool.

Extract php into C drive

Extract PHP into C drive

php7 folder in C drive

php7 folder in C drive

Step 3: Add Environment Variables for PHP in Windows ten or vii


And then, now we take PHP files on our Windows merely to use it globally throughout on the system, we have to add its path to the system variables. After that, nosotros don't need to use the whole path of the PHP binder to run the php.exe file. Thus, printing Windows + R keys on the keyboard simultaneously to open the RUN box. In that type sysdm.cpl.

Run to open comupter properties

The above RUN command will open up the Organization properties, where select the Avant-garde Tab and then EnvironmentVariables.

Environment Variables

From the opened window go to System Variable section and select the Path and then click the Edit button.

Add Windows 10 Variable path

Select the New… button and type C:/php7  then click the OK push button and again the same to save and shut it.

Add PHP path to Windows 10 & 7

Add PHP path to Windows ten

Pace iv:  Install VC5 (Visual C++ Redistributable for Visual Studio)


The PHP requires VC5 to run on Windows, thus we need at least Visual C++ Redistributable for Visual Studio 2015 to make information technology work on our organization properly. Use this link to download VC5 on Windows.

An executable file will get downloaded and just like whatever other Windows software install it.

Install VC5 (Visual C++ Redistributable for Visual Studio) 

Install VC5 (Visual C++ Redistributable for Visual Studio)

Step five: Check the PHP installation via Command prompt


Finally, open your command prompt and type php -v, it will requite the data of the installed PHP on your Windows 10 or 7.

See the below screenshot for reference:

Check the PHP installation via Command prompt

Pace 6: Download and Install Composer on Windows ten or 7


We already have PHP on our system, its time to prepare the Composer Dependency direction tool for it. For that simply go to the official website of it and download the Composer version for WIndows. Information technology volition be in executable class, so but run it similar any other Windows software.

i. Download and run Composer-Setup.exe. Click the Next push button.

Developer mode or normal Composer

Developer manner or normal Composer

2. The setup volition automatically select the path of the PHP, yet, if it does not then do information technology manually.

PHP.exe file path for Composer

PHP.exe file path for Composer

3. If the folder doesn't have the php.ini, it volition through an error and will attempt to create the one for information technology.

Create php.ini file for PHP composer

Create php.ini file for PHP composer

4. Skip the Proxy setting and simply click on the Next button.

Proxy settings

Proxy settings

5. Finally, select the install button and the setup will download install the composer on your Windows 10, eight, 7 computers.

Ready to install files

Ready to install files

Composer install windows 10

Composer install windows 10

Composer installation finished

Composer installation finished

Footstep 7: Test Composer is working or not


Open Command prompt, if already y'all have then close and run it once again. To check the installed composer version simply type the control:

composer -v

Test Composer is working or not

Example to install packages using Composer on Windows


Now we already have this Dependency Director on our system, let's use it to install some libraries or packages for some PHP project.

I simply assume that yous already have some project; let's say you desire to use WordPress for that. Or simply y'all want to employ the Composer to get and beginning with WordPress, thus the command will be:

composer require  johnpbloch/wordpress": "*"

Aye, spider web server and other things are required to use the WordPress CMS on Windows, and here I used this command to just give you an idea about its command.

WOrdpress packages using composer

Other Tutorials:

  • How to Create Windows 10 installation media
  • How to install Virtualbox guest additions Windows or Linux
  • v Best Linux Distro for Windows users as alternatives- 2020
  • Install Composer on Ubuntu Linux

Source: https://www.how2shout.com/how-to/how-to-install-php-composer-on-windows-10.html

Posted by: floresloguithat36.blogspot.com

0 Response to "How To Setup Composer In Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel