Hello Dpeca, great work.
i follow this instructions and install php 7.4 and 8.0 perfect.
My problem is that the server global version of php is the 8.0:
:~$ php -v
PHP 8.0.5 (cli) (built: May 3 2021 11:58:58) ( NTS )
And i need the original stable 7.3 because i have some projects that composer tell me has incompatible dependences with php8.0
how i can do this??
thank you so much.
How to change default php-cli version
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
Globally:
(be logged as root)
or
-------------------------------------------------------------------------------------
Per user account:
This method does not always give the desired result, in that case you have to globally change the PHP version, perform the desired task, and then restore the old PHP version.
For wp-cli you can change PHP version this way - viewtopic.php?f=18&t=760
(be logged as root)
Code: Select all
update-alternatives --config php
Code: Select all
update-alternatives --set php /usr/bin/php8.2
Per user account:
Code: Select all
# be logged as desired user
alias php='php8.2'
echo "alias php='php8.2'" >> ~/.bashrc
source ~/.bashrc
For wp-cli you can change PHP version this way - viewtopic.php?f=18&t=760