What is Composer

Composer is a tool for managing PHP libraries and dependencies. If you work with PHP-based websites (like WordPress plugins, Laravel, Symfony, etc.), Composer helps you easily install the required packages.

Why you might need it

When installing a PHP script that requires other packages, Composer will automatically download and install everything for you. It's convenient, secure, and saves time.

How to use Composer in ISPmanager

  1. Log in to ISPmanager and go to Tools → Composer.
  2. Click Create.
  3. Select the project path — where your site or app is located.
  4. Optionally, set the path to the composer.json file or enter a command to run.

Example: to install dependencies, click Run with the command:

composer install

Where to find composer.json

This file is usually included in your project. It contains the list of dependencies. If it's missing, you can create it manually or use:

composer init

Useful commands

  • composer install — install dependencies
  • composer update — update libraries
  • composer require vendor/package — add a new library

Tips

  • Make sure the correct PHP version is selected (see WWW domains → PHP settings).
  • If Composer fails to run, check the folder permissions.

More info

New to Composer? Check the official Composer documentation.

Using Composer via terminal (Shell client)

If you prefer the command line, you can use Composer directly via SSH. This is especially useful for developers and advanced users.

  1. Connect to the server via SSH (using the Shell client in ISPmanager or a tool like PuTTY).
  2. Navigate to your project directory, for example:
    cd /var/www/user/data/www/example.com
  3. Run Composer with the local file path:
    ./composer.phar install

If you get an error, try running it with PHP explicitly:

php ./composer.phar install

Use ls to verify that composer.phar exists in your directory. If not, install or upload it via the ISPmanager web interface.

Hasznosnak találta ezt a választ? 0 A felhasználók hasznosnak találták ezt (0 Szavazat)