Composer is the package manager for PHP: it downloads the libraries a project depends on, pins their versions and generates the autoloader. Laravel and Symfony applications, and many modern scripts, will not run without it. Many developers run it only locally and upload a ready-made vendor folder, but with SSH access, running Composer directly on the hosting server is cleaner and less error-prone.
Installing Composer in your home folder
Shared hosting does not allow writing to system directories, so Composer goes into your account's home folder; no root access is needed. Connect over SSH, download the official installer and run it. The official site also publishes a hash check for the installer, which you should run after downloading because the hash changes with each installer release.
mkdir -p ~/bin
cd ~
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# run the hash check command from the official site here
php composer-setup.php --install-dir=$HOME/bin --filename=composer
php -r "unlink('composer-setup.php');"
~/bin/composer --version
Running it with the right PHP version
The most common mistake is running Composer with a different PHP version from the site. In ISPmanager the version is chosen per site, but plain php in the terminal uses the server default, so Composer may resolve packages for the wrong version. Call it through the full path of the site's PHP binary, typically something like /opt/php83/bin/php on ISPmanager servers (check with ls /opt or ask support):
/opt/php83/bin/php ~/bin/composer --version
echo "alias composer='/opt/php83/bin/php ~/bin/composer'" >> ~/.bashrc
source ~/.bashrc
You can also pin the server's PHP version in composer.json with "config": {"platform": {"php": "8.3.0"}}, so packages are resolved for that version on every machine.
Example: deploying a Laravel app
A Tashkent logistics company wants to run an internal Laravel app for order tracking on app.example.uz. The developer uploads the code without vendor, then on the server runs:
cd ~/www/app.example.uz
composer install --no-dev --optimize-autoloader
composer check-platform-reqs
--no-dev skips development packages and --optimize-autoloader speeds up class loading. check-platform-reqs reports missing extensions such as intl or gd, which you then enable for the site's PHP version in the panel. For Laravel, also point the site's document root to the project's public folder in the ISPmanager site settings.
install versus update
composer install installs the exact versions recorded in composer.lock, so the server gets the set you tested. composer update looks for newer versions and rewrites the lock file; running it on a live server can pull in untested code. Update locally or on staging, test, upload the new composer.lock, and run only install on the server. Always commit composer.lock to Git.
Memory limits and working without SSH
Dependency resolution can use a lot of memory, and shared accounts have limited resources. install needs far less memory than update, another reason to resolve dependencies elsewhere. COMPOSER_MEMORY_LIMIT=-1 removes Composer's own limit, though the plan's limit still applies. Without SSH, run Composer locally with the platform setting in place, archive vendor, upload the archive and extract it with the file manager.
Security notes
- Keep
vendor,composer.jsonand.envout of the web root by pointing the document root at a public folder. - Run
composer auditregularly to check installed packages for known vulnerabilities. - Keep Composer itself current with
composer self-update.
For questions about SSH access or PHP extensions on sayt.uz hosting, contact support through the cabinet.