Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer is very slow while downloading Laravel

can you help me please? I want to install Laravel via composer create-project laravel/laravel in to the cms directory but Composer downloads it very very slow. Can you help me with it how to boost it?

Here is my terminal:

saidalo@Saidalo-Yodgoroff:/var/www/html$ composer create-project laravel/laravel cms "5.1.*"
Installing laravel/laravel (v5.1.33)
  - Installing laravel/laravel (v5.1.33)
    Downloading: 100%         

Created project in cms
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing vlucas/phpdotenv (v1.1.1)
    Downloading: 100%         

  - Installing symfony/var-dumper (v2.7.11)
    Downloading: 100%         

  - Installing symfony/translation (v2.7.11)
    Downloading: Connecting...

I don't know what to do!

like image 682
Saidalo Avatar asked Apr 25 '16 05:04

Saidalo


People also ask

Why is Composer update so slow?

Composer update is very slow if you have a lot of dependencies/packages implemented. You should avoid variable versions and think about using a HHVM as server.

Why is Composer slow?

By default, Composer will download everything serially. This can end up being slow if you're creating or cloning a project and running Composer for the first time, even though Composer does cache package data. prestissimo is a plugin for Composer that enables parallel downloads.

Can I install Laravel without Composer?

You do not need to run Composer on your server as well as locally, once you run composer install or composer update your project will have all its dependencies available and you can just upload it straight to your server.


2 Answers

Try

composer config --global repo.packagist composer https://packagist.org

to force https

like image 109
ajthinking Avatar answered Oct 23 '22 07:10

ajthinking


There is a package to speed up your composer. It may be useful

  1. Disable Xdebug Turn it off and be happy.

  2. Use Prestissimo is a global Composer plugin that installs dependencies in parallel. It is crazy fast. It’s worth noting that Prestissimo requires cURL, which may not work behind certain firewalls or proxies. I haven’t run into any issues at all personally.

Source: composer speed up from laravel

like image 31
Veerendra Borra Avatar answered Oct 23 '22 07:10

Veerendra Borra