With a market share of more than 80%, PHP is the go-to scripting language for many programmers when it comes to creating dynamic content. Whether you’re operating your own weblog, running an internet forum, or designing an online shop, it’s likely that the software behind this will be written via PHP. Our PHP tutorial for beginners will introduce you to the basics of the popular scripting...Learn PHP: a PHP tutorial
PHP Composer (Composer) is a so-called "Dependency Management Tool", which makes it possible to reference external sources and libraries in your own PHP projects comfortably and to keep them up to date.
Many open source projects no longer deliver ZIP archives or other installation packages - but reference the respective GitHub repositories.
To be able to use Composer in IONOS web hosting and performance hosting packages, you need to know that Composer is not installed by default because it is a small PHP script itself, which requires a PHP interpreter. Therefore, we recommend that you upgrade your PHP version before downloading and running Composer.
Web hosting with a personal consultant
Fast and scalable, including a free domain for the first year and email address, trust web hosting from IONOS!
Download and run PHP Composer
Almost all IONOS packages allow shell access via SSH. If your package does not support SSH access, it is best to switch to a different WebHosting contract, as Composer itself requires more resources.
To use Composer in your web IONOS hosting package, please log in via SSH and follow these steps. If you have any questions, please feel free to post them in the discussion of the article. PHP-Composer also offers extensive documentation in English.
curl -sS https://getcomposer.org/installer | /usr/bin/php7.1-cli
After that there is a composer.phar file in your webspace. If you now call composer.phar directly, you will get an error, because Composer does not automatically find the correct PHP version. Therefore, start the Composer for the first time as follows.
Start Composer for the first time
As a result, you get an overview of all Composer commands.
To always use the latest Composer version, use e.g. the following command:
/usr/bin/php7.1-cli composer.phar selfupdate
The path to PHP-CLI in the above example is version dependent and may change!