Articles in this section

How to install/enable PHP Composer 2 on Plesk Server?

kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux

Question

  • How to install PHP Composer 2?
  • How to upgrade PHP Composer to PHP Composer 2?

Answer

  1. Log in to Plesk

  2. 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.

  3. 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'

  4. Connect to the server via SSH

  5. Navigate to Composer directory:

    # cd /usr/local/psa/var/modules/composer/

  6. Delete current composer.phar file:

    # rm composer.phar

  7. Download the latest stable Composer 2 composer.phar file from official website:

    # wget https://getcomposer.org/download/latest-stable/composer.phar

  8. Make composer.phar file executable:

    # chmod +x composer.phar

  9. Log into Plesk

  10. Go to Websites & Domains > example.com > PHP Composer > Update.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.