Wordpress Upgrade to Php 7 problem

php
wordpress

#1

first - any way to make the wordpress install php7 be the default?

I can’t figure out why when I try to upgrade from php 5.6 to php 7 with a Wordpress install – Wordpress won’t recognize the upgrade.

I have done it before on C9 and it worked fine. But now it’s not working. WHen i do php -v it says 7 but when i do php info it says different.

Please assist. This is what worked before:

sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y

sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip -y

sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.0 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars

find out what version of php
php --version


#2

You have to disable the php 5 mod and enable the 7.0 mod

Try these commands:

sudo a2dismod php5
sudo a2enmod php7.0
sudo service apache2 restart
sudo service mysql restart