Contents
How do I switch between PHP versions?
You can do sudo update-alternatives –config php to set which system wide version of PHP you want to use. This makes your command line and apache versions work the same. You can read more about update-alternatives on the man page. That’s it you can now easily switch form PHP7 to PHP 5.6!
How do I find my default PHP version Ubuntu?
“how to set default php version in ubuntu” Code Answer’s
- //In ubunutu.
- Default PHP 7.1 is set on your system and you need to switch to PHP 5.6.
-
- $ sudo a2dismod php7.1.
- $ sudo a2enmod php5.6.
- $ sudo service apache2 restart.
- sudo update-alternatives –set php /usr/bin/php5.6.