Installing an Exact Composer Version

Installing an Exact Composer Version

Older Magento and PHP projects may require Composer 1, while newer ones need Composer 2. You can install whichever version a project needs.

The command

Change the version number to suit:

sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.16

Check it with composer --version. Once installed, composer self-update --1 or --2 also switches between major versions.

Stuck on something similar? Our PHP development team is happy to take a look.

Need a hand?

Stuck on something similar?
We can fix it with you.

Send us the problem. A senior developer reads every message and replies within one working day.