Select your language

When executing commands on our web servers from the command line (CLI), the default PHP version of Hostpoint is always used. If you use a different PHP version for the command line (CLI), this must be specified with the full path or adapted globally. Otherwise, the command will not be executed correctly.

Determining the version

If you want to know which version of PHP CLI is currently being used as the standard, you can determine this with the php-v command via the shell. The result will look like this, for example:

[USER@SERVER:~] $ php -v
PHP 8.3.3 (cli) (built: Feb 26 2024 14:01:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.3, Copyright (c) Zend Technologies
with Zend OPcache v8.3.3, Copyright (c), by Zend Technologies

Specifying the version for individual commands

Let’s assume that Hostpoint is using PHP version 8.1 as the default. You, on the other hand, are already using version 8.3 for your website. Now you must specify the full path including the PHP version for each CLI (Shell) command. So instead of /usr/local/bin/php you would have to specify usr/local/php83/bin/php.

For more information on paths, see this article.

Adapting the version globally

To avoid having to enter the PHP version manually with every command via the command line, you can also adapt the version globally.

To do this, create a file with the name .profile with the following content in the root directory of your web hosting (replace the PHP version with the one you are using):

export PATH="/usr/local/php83/bin:$PATH"
Please use this form only to provide feedback on the above guide.
For support requests please use this form instead.


Unable to find what you were looking for?

Our support experts are happy to assist you personally!


© 2001 - Hostpoint AG