Question
- How to install PHP Composer 2?
- How to upgrade PHP Composer to PHP Composer 2?
Answer
-
Go to Extensions > My Extensions > Panel.ini Editor > Open.
Note: If Panel.ini Editor extension is not installed, install it from the Extensions menu in Plesk.
-
Switch to the Editor tab and Specify the Composer version by adding the lines below at the end of the file:
[ext-composer]
composerVersion = '2' -
Connect to the server via SSH
-
Navigate to Composer directory:
# cd /usr/local/psa/var/modules/composer/
-
Delete current composer.phar file:
# rm composer.phar
-
Download the latest stable Composer 2 composer.phar file from official website:
# wget https://getcomposer.org/download/latest-stable/composer.phar
-
Make composer.phar file executable:
# chmod +x composer.phar
-
Go to Websites & Domains > example.com > PHP Composer > Update.