We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Today, it's about a simple task: switching PHP versions on the command line in Ubuntu:
sudo update-alternatives --set php /usr/bin/php8.1
It works the same for the other PHP commands:
sudo update-alternatives --set phar /usr/bin/phar8.1
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.1
sudo update-alternatives --set phpize /usr/bin/phpize8.1
sudo update-alternatives --set php-config /usr/bin/php-config8.1
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.