Composer Speed

Speed up slow PHP Composer Installs

As a php developer you might have faced issues with slow installation speed of composer.

Here are few steps to speed up your composer installs.

  1. Under the hood composer makes use of Packagist to download & query packages. Now by default composer will hit main packagist.org, Which might not be the nearest mirror available to your location.

In order to check the nearest mirror available check out the mirrors list, Or refer to the following list.

After you have figured out the nearest mirror you can run the following command to set it as default mirror for composer.

composer config -g repos.packagist composer https://packagist.in

  1. You can use this composer plugin by installing it globally in your system. Here’s the benchmark example

This is a composer plugin that downloads packages in parallel to speed up the installation process.

You can run this command to install:

composer global require hirak/prestissimo