how to check which version of php apache is using code example Example: get apache php version sudo a2dismod php5 sudo a2enmod php7.0