VestaCP upgrade php7.3 in Ubuntu
While writing this post VestaCP is using PHP 7.2 default installed. Running Apache2 and Nginx as back-end and frontend. In this post, I’m going to show you, how to upgrade Vestacp to php7.3 in ubuntu.
First, Let’s start by checking the current version of PHP in VestaCP.
# php -v
The output will look like this. In my environment, the PHP version is 7.2.
PHP 7.2.24-0ubuntu0.18.04.6 (cli) (built: May 26 2020 13:09:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.6, Copyright (c) 1999-2018, by Zend Technologies
Second option to verify PHP version, Create phpinfo.php file in the root directory of the VestaCP hosted website. Now browse the site URL. http/s://your-website.com/phpinfo.php

Next step, update OS, Security and Package.
# apt-get update
Next step, Install the software-properties-common and python-software-properties package. Add Ondrej PPA. And then update the sources.
Please follow the link to learn more about PPA.
# sudo apt install software-properties-common
# add-apt-repository ppa:ondrej/php
# apt-get update
Now we can install php7.3 and extensions using the command below . Restart Apache 2, and VestaCP service.
# apt install php7.3
#apt-cache policy php7.3
#apt install php7.3-fpm
#apt-cache policy php7.3-fpm
#apt install php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap php7.3-zip php7.3-intl -y
# service apache2 restart
# service vesta restart
Lets check the PHP version one more time.

Great, we have just updated PHP to the 7.3. Let’s verify the version using the second method by browsing the URL. http/s://your-domain.com/phpinfo.php

Boohoo, The system is convinced the PHP version is updated. But VestaCP is not in the mood to listen about system advice. Since the VestaCP is using the Apache2 as backend and Nginx as frontend. Looks like Apache2 is unable to recognize the changed version of PHP.
Next Step, We are going to tell the Apache2 that the PHP version is changed. Disable an old module by removing those symlinks and enable the new module by configuring those symlinks.
Disable old PHP version.
# a2dismod php7.2
Enable new PHP version, restart the Apache2 and VestaCP services.
# a2enmod php7.3
# service apache2 restart
#service vesta restart
Lets check again by browsing the site. http/s://your-site.com/phpinfo.php

WE DID IT. .
Please don’t forget to delete phpinfo.php from the root directory. Run an “apt autoremove” command to remove old, unused, and replaced components.
Have a Nice Day
Sure, you are welcome. Please don’t copy and paste the content. You can share the content URL.
Keep this going please, great job!
I just couldn’t depart your site before suggesting that I actually enjoyed the standard info an individual provide to your visitors? Is going to be again regularly in order to investigate cross-check new posts.
In my opinion you are not right. Write to me in PM, we will talk.
I to you will remember it! I will pay off with you!
I join. It was and with me.
Earlier I thought differently, many thanks for the information.
Instead of criticising write the variants.
Bravo, seems excellent idea to me is
Completely I share your opinion. It seems to me it is excellent idea. I agree with you.
Hi to every one, the contents present at this web page are really amazing for people knowledge, well,
keep up the good work fellows.
I’m not that much of a online reader to be honest but your
sites really nice, keep it up! I’ll go ahead and bookmark your
site to come back in the future. Many thanks
You’ve made some decent points there. I looked on the web for more
info about the issue and found most individuals will go along with your
views on this website.
you are truly a just right webmaster. The web site loading pace is incredible.
It sort of feels that you’re doing any unique trick.
Furthermore, The contents are masterwork. you’ve done a fantastic
job on this matter!
It’s appropriate time to make some plans for the future and
it’s time to be happy. I have read this post and if I could I want to suggest you
few interesting things or suggestions. Perhaps you could write next
articles referring to this article. I wish to read more things about it!
Have you ever considered writing an e-book or guest authoring on other sites?
I have a blog based on the same information you discuss and
would really like to have you share some stories/information.
I know my viewers would value your work. If you’re even remotely
interested, feel free to shoot me an e-mail.
Amazing <3…
I’m impressed, I must say. Seldom do I come across a
blog that’s equally educative and interesting, and without a doubt, you’ve hit the nail on the head.
The issue is something which not enough folks are speaking intelligently about.
I’m very happy that I found this during my hunt for something regarding this.
Thanks for finally writing about > VestaCP upgrade php7.3 in Ubuntu -
BoredAdmin < Liked it!
I do believe all of the ideas you’ve presented
to your post. They are very convincing and can definitely work.
Still, the posts are too short for beginners. May
just you please extend them a little from subsequent time?
Thank you for the post.
Hi, I think your blog might be having browser compatibility
issues. When I look at your blog site in Firefox, it looks
fine but when opening in Internet Explorer, it has some
overlapping. I just wanted to give you a quick heads up!
Other then that, terrific blog!
Very good write-up. I certainly love this website.
Thanks!
Great article.
Greetings from Carolina! I’m bored to tears at work so I decided to
browse your website on my iphone during lunch break.
I really like the info you provide here and
can’t wait to take a look when I get home. I’m surprised at how quick your blog loaded on my cell phone ..
I’m not even using WIFI, just 3G .. Anyways, awesome site!
May I just say what a relief to find an individual who
actually knows what they are talking about on the
web. You definitely know how to bring an issue to
light and make it important. More people really need to look
at this and understand this side of the story.
It’s surprising you’re not more popular given that you
surely possess the gift.