How to enable and disable php version in Ubuntu

Disable php version in ubuntu
sudo a2dismod php7.0
or,
sudo a2dismod php7.1
or,
sudo a2dismod php7.2

Enable php version in ubuntu
sudo a2enmod php7.3

Restart Apache service 
sudo systemctl restart apache2


Stup default PHP version in Ubuntu system
sudo update-alternatives --config php

There are 2 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php7.3   73        auto mode
  1            /usr/bin/php7.2   72        manual mode
* 2            /usr/bin/php7.3   73        manual mode

Press <enter> to keep the current choice[*], or type selection number:
Or,
Setup default php version in ubuntu 
sudo update-alternatives --set php /usr/bin/php7.3
Share on Google Plus

About Md. Shahzad Alam

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment