How to update php 7.0 to php 7.2 ubuntu 16 vestacp using php-fpm or apache

preview_player
Показать описание
In this video tutorial, I showed you how you can update you PHP 7.0 which is deprecated now to PHP 7.2 in ubuntu 16.04 LTS using vestacp including PHP 7.2 all required libraries and how to change vesatcp configuration to load new php 7.2, how to move your existing domains to PHP 7.2, how to switch PHP-fpm 7.0 to 7.2 or vice versa

A lot of issues arose even after that like adding new domains or adding SSL cert and found web template missing and I fixed all those issues as well and will make some video on it might be not detailed will provide all instructions so it will help.

Commands to use:

php -v [to check existing version of php]

v-backup-user admin [This will backup all users at once]

dpkg --get-selections | grep -v deinstall | grep php7.0 [ to see all the installed apckages for php 7.0] Mcrypt is not required to install for PHP 7.2 and latest versions

apt-get update
apt-get install python-software-properties
apt install software-properties-common

[Add source]
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt-get update
spt-get install php7.2

apt-get install php7.2-cgi php7.2-curl php7.2-fpm or whatever packages you copied from --get selections command by replacing php7.0 with 7.2

a2dismod php7.0
a2enmod php7.2

/etc/init.d/php7.2-fpm stop
/etc/init.d/php7.0-fpm stop
update-alternatives --config php [Make sure alternative is set for php 7.2]

/etc/init.d/php7.2-fpm restart
service nginx restart

the web interface will still be running on PHP 7.0

[Now check the installed php versions]

cd /etc/php/
ls

cd 7.2/fpm/

Now check the vesta configuration

Change the WEB_BACKEND to

'php7.2-fpm'

Now go to fpm dir of PHP 7.0 to copy all files need to paste in 7.2 for existing sites

cd /etc/php/7.0/fpm/pool.d

copy all files inside the same dir of 7.2

cp * ../../../7.2/fpm/pool.d/

/etc/init.d/php7.0-fpm stop
/etc/init.d/php7.2-fpm start

You can follow me on Instagram, Twitter, and Facebook

Social Handle: Techobia
Рекомендации по теме
Комментарии
Автор

Excellent! It worked.
In my case — I also updated Ioncube Loader to 7.2.so

VladimirChanaev