Knowledge Base

What Is PHP Composer?

What Is PHP Composer?

  • Key Features of PHP Composer in Plesk
  1. Automatic Detection

    • Plesk automatically detects if a composer.json file exists in your website’s root.

    • You can install dependencies with a single click.

  2. Run Composer Commands from UI

    • Perform common Composer tasks such as:
      • Install (install all required dependencies)

      • Update (update all or selected packages)

      • Remove (uninstall dependencies)

      • Validate (check composer.json for errors)

  3. Automatic Installation

    • If Composer is not yet installed on your Plesk server, Plesk can install it automatically.

  4. Environment Management

    • You can run Composer in different PHP versions configured under your subscription.

  5. Command-Line Access (Optional)

    • Advanced users can still use SSH to run Composer commands manually.

  • Typical Use Case

Let’s say your website runs Laravel, Symfony, or WordPress with custom plugins.
When you upload or create a composer.json file that defines all needed libraries, you can use PHP Composer in Plesk to install those dependencies — no terminal needed.

Example:

{
"require": {
"monolog/monolog": "^3.0",
"guzzlehttp/guzzle": "^7.0"
}
}

Plesk will install both monolog and guzzle packages into your project directory automatically.

  • How to Use PHP Composer in Plesk

    ◦ Log in to your Plesk panel

    ◦ Go to Websites & Domains → select your website.

    ◦ Click PHP Composer (you’ll see this if a composer.json file exists).

    ◦ Use the available buttons to:

    • Install dependencies
    • Update dependencies
    • Remove vendor folder
    • Run custom commands

 

Please rate this article to help us improve our Knowledge Base.

0 0