- Plesk for Linux
- Plesk for Windows
How to run/call Composer with Plesk precompiled PHP?
Composer is a tool that helps to find, install, and update library packages that your PHP project depends on. Libraries are installed in the project root directory.
The Composer utility is available as a part of Plesk. Starting from Plesk Obsidian, PHP Composer is available as a Plesk extension. To learn more about PHP Composer Plesk extension, visit:
Plesk has already compiled PHP with most popular modules. However, if it is necessary to install some additional libraries required by your project for Plesk PHP versions, connect to a Plesk server via SSH (Linux) / RDP (Windows Server) and instead of the default command:
# composer [options] [arguments]
use the following commands, where X.X (XX for Windows Server) should be replaced with an installed PHP version provided by Plesk (5.6, 7.0, 7.1, etc):
Warning: Be careful when installing untrusted packages as root/super user. See https://getcomposer.org/root for details.
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]
on Windows Server:
C:\> "%plesk_dir%Additional\PleskPHPXX\php.exe" "%plesk_dir%Additional\Composer\composer.phar" [options] [arguments]
- Managing PHP Project Dependencies with Composer - Plesk Documentation
- Official Composer Documentation