Download Composer Latest: v2.10.3

To quickly install Composer in the current directory, run the following script in your terminal. To automate the installation, use the guide on installing Composer programmatically.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"

This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then download the latest composer.phar in the current directory. The 4 lines above will, in order:

  • Download the installer to the current directory
  • Verify the installer SHA-384, which you can also cross-check here
  • Run the installer
  • Remove the installer

Most likely, you want to put the composer.phar into a directory on your PATH, so you can simply call composer from any directory (Global install), using for example:

sudo mv composer.phar /usr/local/bin/composer

For details, see the instructions on how to install Composer globally.

WARNING: Please do not redistribute the install code. It will change with every version of the installer. Instead, please link to this page or check how to install Composer programmatically.

Notable Installer Options

--install-dir

You can install composer to a specific directory by using the --install-dir option and providing a target directory. Example:

php composer-setup.php --install-dir=bin

--filename

You can specify the filename (default: composer.phar) using the --filename option. Example:

php composer-setup.php --filename=composer

--version

You can install composer to a specific release by using the --version option and providing a target release. Example:

php composer-setup.php --version=1.0.0-alpha8

--preview, --snapshot, --1 (EOL), --2, --2.2 (LTS)

Select a specific version channel instead of the default latest stable. See "Download channels" below for more details. Example:

php composer-setup.php --2.2

--help

The installer provides more options for specific environments, use the --help option to see all of them.

Download channels

By default the installer and composer self-update will download the latest stable version only. You may select a different download channel though.
If you would like to help test pre-release versions you can use the --preview flag on either the installer or self-update.
For snapshot builds, which are done from the latest Composer commit, you can use the --snapshot flag.
To programmatically install specific major versions you can use the --1 or --2 flag. To select the latest 2.2 LTS you can use --2.2.

Maintenance policy

Bug fixes are only guaranteed to be provided for the latest feature release. Long-term support (LTS) releases additionally receive security fixes for an extended period. The maintenance-until dates below are a minimum guarantee, not a hard cutoff.

Release line Status Maintained until (minimum)
2.10.x Bug & security fixes Next minor release
2.2.x (LTS) Critical security fixes only 2026-12-31
1.10.x End of life 2026-05-30

Manual Download

If you prefer to download the phar manually, here are the available versions:

Latest Stable (sha256 / sha256sum / asc) for PHP 7.2+ users
Latest Preview (alpha/beta/RC) (sha256 / sha256sum / asc)
Latest Snapshot (sha256 / sha256sum)
Latest 2.x (sha256 / sha256sum / asc)
Latest 2.2.x LTS (sha256 / sha256sum / asc) for PHP 5.3 to 7.1. For PHP 7.2+ please use the latest version instead of LTS. See the LTS version support policy for more information.

Composer (composer.phar) versions history
2.10.3 2026-08-27 sha256sum 7a2d379d5b8ffdaa028580ef26494c36d2feef4b178d3dd1473a4dbc5e17c8d6 asc changelog
2.10.2 2026-07-01 sha256sum 5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027 asc changelog
2.10.1 2026-06-04 sha256sum 345b9c6a98da5c30dcbd4b0d99fc8710bf0ae98a3898eea18f7b2ad9dec93f06 asc changelog
2.10.0 2026-05-28 sha256sum a346538851988ead111d11e3cbd7d372eeba44abd0af412e09890d3c21ea6c31 asc changelog
2.10.0-RC2 2026-05-20 sha256sum 3c10d2ee7901669a3af6b5126fa5fc3eba01cc37d3988494d7c086992a47e935 asc changelog
2.10.0-RC1 2026-04-01 sha256sum 89b3c906a486a3ba3e51dcb3b6144be36941773a223519a13728a1acd5744c5b asc changelog
2.9.8 2026-05-13 sha256sum 59b2c50e10cafa0d8efc19ede9a326d782f096c674a26baf98cf042ce23de890 asc changelog
2.9.7 2026-04-14 sha256sum d3c6801ea6e5dd291d0f149295a4d0f1539a74d5231958fe8fdaa889a497e6cf asc changelog
2.9.6 2026-04-14 sha256sum 9065d89f8b5d8103aa733a6bc24e1b2344d8ccdd63c5b63ccd188f6bca074806 asc changelog
2.9.5 2026-01-29 sha256sum c86ce603fe836bf0861a38c93ac566c8f1e69ac44b2445d9b7a6a17ea2e9972a asc changelog
2.9.4 2026-01-22 sha256sum d3eb5c4cb2e708267dac5f9a76d2a57b07836c7ea68783a1a02bd6d94753ea80 asc changelog
2.9.3 2025-12-30 sha256sum 3b3f9503a2d46590170e45edd29734197e797cea545b396d0b2823cac8ef4643 asc changelog
2.9.2 2025-11-19 sha256sum 471f2d857abf0ec18af7b055e61472214d91adb24f9bdbbb864c1c64faad7dd6 asc changelog
2.9.1 2025-11-13 sha256sum 1f9c85291820f8496ca95cd49028002db328e7fa99b4f548e8afa7f6774540f7 asc changelog
2.9.0 2025-11-13 sha256sum 9c3982569587a4d976486635d4b5bbe794156b37b8b205131b00607045332ef1 asc changelog
2.9.0-RC1 2025-11-07 sha256sum 06ec92c8c547e730a207d77e8083634c4a87c9739b794adbeb48faea40552ce0 asc changelog
2.8.12 2025-09-19 sha256sum f446ea719708bb85fcbf4ef18def5d0515f1f9b4d703f6d820c9c1656e10a2f2 asc changelog
2.8.11 2025-08-21 sha256sum 257a969e9a9d27e0e45cfe954835c17a76033ba84a388e0f472db83eded65a8b asc changelog
2.8.10 2025-07-10 sha256sum 28dbb6bd8bef31479c7985b774c130a8bda37dbe63c35b56f6cb6bc377427573 asc changelog
2.8.9 2025-05-13 sha256sum 8e8829ec2b97fcb05158236984bc252bef902e7b8ff65555a1eeda4ec13fb82b asc changelog
2.8.8 2025-04-04 sha256sum 957263e284b9f7a13d7f475dc65f3614d151b0c4dcc7e8761f7e7f749447fb68 asc changelog
2.8.7 2025-04-03 sha256sum 2528507840901565fe6cecd19c7e9f8983b8d91b5eb4bab1599b14254401e675 asc changelog
2.8.6 2025-02-25 sha256sum becc28b909d2cca563e7caee1e488063312af36b1f2e31db64f417723b8c4026 asc changelog
2.8.5 2025-01-21 sha256sum 9cef18212e222351aeb476b81de7b2a5383f775336474467bf5c7ccfe84ab0cc asc changelog
2.8.4 2024-12-11 sha256sum c4c4e2e1beab0ea04e0bd042a5dbba9feda1fbf5eda0d36203958edd343c0a8a asc changelog
2.8.3 2024-11-17 sha256sum 8323b4105c6e166d47c9db93209370083f9e421743636e108c37d8c1126386ef asc changelog
2.8.2 2024-10-29 sha256sum 9ed076041e269820c6c4223d66c5325fcaddc7f4b4317b3ba936812a965857ed asc changelog
2.8.1 2024-10-04 sha256sum 930b376fbd2147a623ea7b704eb9d3b8b0d6072992207aa0535aa21f6f05378e asc changelog
2.8.0 2024-10-02 sha256sum 1b23f2a31cb05f0e8ae29b5723fc5edf37e565106d6fae2cf23f298efa9c8981 asc changelog
2.7.9 2024-09-04 sha256sum b6de5e65c199d80ba11897fbe1364e063e858d483f6a81a176c4d60f2b1d6347 asc changelog
2.7.8 2024-08-22 sha256sum 3da35dc2abb99d8ef3fdb1dec3166c39189f7cb29974a225e7bbca04c1b2c6e0 asc changelog
2.7.7 2024-06-10 sha256sum aab940cd53d285a54c50465820a2080fcb7182a4ba1e5f795abfb10414a4b4be asc changelog
2.7.6 2024-05-04 sha256sum 29dc9a19ef33535db061b31180b2a833a7cf8d2cf4145b33a2f83504877bba08 asc