How to update vestacp from PHP 7.2 to 7.4 in Ubuntu (All commands in description)

Last time I did the upgrade from PHP 7.0 to 7.2 where I am using PHP-fpm with Nginx where steps I showed are also for apache and in this video I provided you step by step instructions to update you PHP from 7.2 to 7.4 along with all the settings which need to be done at vestacp end and also if you already had configured domain how to move those in PHP 7.4 while maintaining everything intact.

Previous video link PHP 7.0 update to PHP 7.2

Here are the commands used in the video.

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
v-backup-user admin

dpkg –get-selections | grep -v deinstall | grep php7.2
—– Below line is a comment for you
—– Copy all those in a text editor and change 7.2 with 7.4 and remove all install and spaces

apt-get install php7.4 php7.4-cgi php7.4-cli php7.4-common php7.4-curl php7.4-fpm php7.4-gd php7.4-imap php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-pspell php7.4-readline php7.4-soap php7.4-tidy php7.4-xml php7.4-xmlrpc php7.4-zip

// this above command include the packages I was using you have to use yours

a2dismod php7.2
a2enmod php7.4

/etc/init.d/php7.2-fpm stop
/etc/init.d/php7.4-fpm start
update-alternatives –config php
/etc/init.d/php7.4-fpm restart
service nginx restart

cd /etc/php/7.2/fpm/pool.d/
cp * /etc/php/7.4/fpm/pool.d/

vi /usr/local/vesta/conf/vesta.conf

change php-fpm to php7.4-fpm in WEB_BACKEND line
WEB_BACKEND=’php7.4-fpm’

Must video to fix the issue while adding a new domain and in case if you get an error while restarting php-fpm user the command mentioned above to restart the same.

You can find the link to the video here where I showed some further steps to do after this video where while adding new domain if you are getting error like “Backend Template not found”

Follow us on:
Instagram: Techobia
Twitter: Techobia
Facebook: Techobia
IGTV: Techobia

#Techobia

You may also like...