How to run Composer with Plesk PHP




  • Avatar
    Jhoni Rosales

    Good morning. thank you for your article
    I have installed the plesk composer extension on the server. OK

    Now how do I run the installation of something?
    For example I want to install phpmailer

    In the command prompt when I type I execute the instruction:

    composer require phpmailer/phpmailer

    'composer' is not recognized as an internal or external command,
    operable program or batch file.

    Could you help with information?

    Comment actions Permalink
  • Avatar
    Kuzma Ivanov (Edited )

    Hi Jhoni Rosales

    The article says that to run composer, you need to use one of these commands instead of "composer":

    • on CentOS/RHEL-based distributions:

      # /opt/plesk/php/X.X/bin/php /usr/lib64/plesk-9.0/composer.phar [options] [arguments]

    • on Debian/Ubuntu-based distributions:

      # /opt/plesk/php/X.X/bin/php /usr/lib/plesk-9.0/composer.phar [options] [arguments]

    where X.X is a PHP version

    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request