How To Switch Between Multiple PHP Versions In Ubuntu

Описание к видео How To Switch Between Multiple PHP Versions In Ubuntu

This brief video tutorial walks you through the steps to switch between multiple PHP versions in Ubuntu Linux and its derivatives. This video is officially tested on Ubuntu 24.04 and 24.10. However, It may work on newer as well as older Ubuntu versions.



Commands:
php -v
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt install php5.6
sudo a2dismod php7.4
sudo a2enmod php5.6
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --config php
sudo update-alternatives --set phar /usr/bin/phar5.6
sudo systemctl restart apache2
sudo a2enmod php7.4
sudo a2dismod php5.6
sudo update-alternatives --set php /usr/bin/php7.4




What you'll learn:
1. How to use multiple versions of the same package at the same time, side by side
2. How to switch to the previous working PHP version
3. Switch Between Multiple PHP Versions
a. How to check the default installed version of PHP using command
b. How you can easily switch between any supported version at any time
c. How You can use both PHP 5.x and 7.x versions together
d. How to install php 5.6 in your system from a PPA
4. Switch from PHP 7.x to PHP 5.x
a. How to disable PHP 7.4 module using command
b. How to enable PHP 5.6 module
c. How to Set PHP 5.6 as default version using command
d. How to set which system wide version of PHP you want to use by default
e. How to set other PHP extensions as default
f. How to restart your Apache web server
g. How to check if PHP 5.6 is the default version or not
5. Switch from PHP 5.x to PHP 7.x
a. How you can switch from PHP 5.x to PHP 7.x version














Song: Balynt - In My Head
Music provided by Vlog No Copyright Music
Video Link: https://bit.ly/3RVt1xS

#computereverywhere #howto #swtich #between #multiple #php #version #ubuntu

Комментарии

Информация по комментариям в разработке