use version of php ubunu code example Example: change php version ubuntu $ sudo update-alternatives --config php or $ sudo a2enmod php7.1(version)