check current version:
lsb_release -a
Install Available Updates
apt-get update
apt-get upgrade
apt-get dist-upgrade
Stop Services
service apache2 stop
START UPGRADE
1. Install the update-manager-core package:
apt-get install update-manager-core
2. Open /etc/update-manager/release-upgrades and verify that the Prompt value is set to lts:
Prompt=lts
3. You’re now ready to begin the upgrade to Ubuntu 16.04 LTS:
do-release-upgrade
Follow the on-screen instructions to complete the installation process.
Install and Update php7.0 properly after upgrade.
note: you might want to remove php 5 first.
$ sudo apt-get purge php5-common (or, $ sudo apt-get purge 'php5*')
$ sudo apt-get install php7.0 php7.0-fpm php7.0-mysql libapache2-mod-php
Side note: enable php short end on php7.0:
$ vim /etc/php/7.0/apache2/php.ini
"short_open_tag=On"
sudo a2enmod php7.0
sudo service apache2 restart
NOTE: upgrade to ubuntu 18.04 which comes with mysql 5.7. To solve no default value issue, use following settign in my.ini
[mysqld] sql-mode="" # Or # sql-mode="NO_ENGINE_SUBSTITUTION"