Plesk

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

Question

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.

Exit mobile version