Working with composer in Timeweb hosting
In addition to version changes in the site settings, in order to execute composer commands, it is sometimes necessary to change the php version when working with ssh, for example with composer, for this we execute the command
echo -e "alias composer='/opt/php72/bin/php -d memory_limit=1024M /usr/local/bin/composer'\nalias php='/opt/php72/bin/php -d memory_limit=1024M'" >> .bash_profile
In this case, the php version will be 7.2 and the memory limit is set to 1 GB. After executing the command, in order for the changes to be applied, you must run
source ~/.bash_profile
After that, you can check the version with the command
php -v
It is worth noting that on shared hosting, the maximum version can be 7.2, and if you need 7.3, you need to write to technical support in order for the account to be transferred to a server that supports this version.