Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

How do I run Composer via SSH? - SIRSTEVEHQ CP

At SIRSTEVEHQ we run multiple different versions of PHP.

On our SSH servers, the execution of commands like "composer" will run with our default, system-level PHP that is also used for internal tools at SIRSTEVEHQ CP. This is a thin version of PHP without all the modules you may be used-to on your website. To enable use of this command, you need to specify the full path to the version of PHP that you wish to run the script as. You can do this on the command line itself.

Here's an example of using PHP 7.1 to execute Composer:

/usr/bin/php71 -f /usr/bin/composer

So the complete command would become:

/usr/bin/php71 -f /usr/bin/composer install

A list of available PHP versions is presented to you in the message of the day (MOTD) once you login to SSH.

Composer 2.0

Composer 2.0 is available across the platform. To use composer 2.0 you need to invoke "composer2" instead of "composer", as follows:

/usr/local/bin/composer2

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I connect a website via SSH? - SIRSTEVEHQ CP

SSH, or ‘Secure Shell’, is a method of remotely accessing and managing your site files, as well...

How do I import a .sql file via the command-line? - SIRSTEVEHQ CP

If you've set up SSH access for a package then you can use one of two methods to import a MySQL...

How do I connect to SSH using 2FA? - SIRSTEVEHQ CP

It's only recommend that you connect to your package via SSH if you're familiar with the command...

Basic UNIX commands and utilities - SIRSTEVEHQ CP

When managing your SIRSTEVEHQ CP web hosting, you may wish to enable SSH access for one or more...

Is Git supported on your hosting platform?

The short answer is yes. We offer Shared Web Hosting with Git, WordPress hosting with Git and...