Help and support

How to change version of PHP cli automatically?

The version of the php interpreter used in cli mode (ssh console) is different from the one used on sites.

If necessary, change the version of php in the cli, this can be done as follows.

Go to the hosting for whom you need to change the php version in the cli ? go to the SSH tab ? click the Linux environment settings button.

In the window that opens, opposite the php-cli version item, select the desired php version from the drop-down list.

After selecting the version, the changes will be saved immediately .

If you already had an open ssh session at the time of the changes, you need to reload it, or execute the command:

 bash -l

You can check the php version installed in the cli with the command:

 php -v

If necessary, use personal settings in the CLI, or the installed site settings on the hosting (php.ini), this can be done within the framework of [this instruction]