Happy New Year peeps!!!. I know I know, it’s late but you know what they say: better late than never.
I was updating my Joomla version to 3.7 and I got a warning telling me that I should update my PHP version on the server. So I went straight to Google to figure out how to do it…and I got all sorts of tutorials that did not work.
Then I came across a Digital Ocean article which also did not work but in the comments, user “Flesh” gave a proper solution…YAY!!
Here is the original article from Digital Ocean: https://www.digitalocean.com/community/questions/ubuntu-14-04-php-version-upgraded-from-5-5-9-to-5-6-phpinfo-still-shows-5-5-9-php-v-shows-5-6-uninstalling-5-5-9?answer=30429. And to get to Flesh’s comment, scroll about half way down the page.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get purge php5-common # remove and purge old PHP 5.x packages
sudo apt-get update # I had to run the update command again
sudo apt-get install libapache2-mod-php5.6
Now I’m on PHP 5.6 and will upgrade to PHP 7 in the coming months once I have all my sites up to Joomla 3.