Skip to content
  • GDPR-compliant
  • 100% hosting in Germany
  • Personal contact
  • Support included
  • Provisioning within 24 hours
PHP 1 min read

How do I access different versions of PHP via SSH?

To specify a particular PHP version via the command line on our shared hosting servers, use the full path to the desired PHP version.

For example:

/opt/keyhelp/php/8.1/bin/php script.php

Alternatively, you can also use the following binds:

keyhelp-php81 script.php

In this example, PHP 8.1 is used to run the script `script.php`. You can replace `8.1` with the desired PHP version, e.g. `7.4`, `8.0`, etc.

Using your own php.ini

You can, of course, also use the PHP command with your own `php.ini` file.

To do this, follow the instructions in the following help article: How do I use my own php.ini / PHP configuration via SSH?

Using PHP Composer

We also offer PHP Composer on our shared hosting servers to support key frameworks; you can easily access this via the SSH command line.

To do this, follow the instructions in the following help article: How do I use PHP Composer via SSH?

Was this article helpful?

You might also be interested in:

Personal support

Of course, our support team is also happy to assist you personally. If you cannot find what you are looking for in our knowledge base or require personalised support, please do not hesitate to contact us. We’re here to help you and to ensure that your experience with our products and services is as smooth and enjoyable as possible.