arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to upgrade php from 5.6 to 7.0 in VestaCP with CentOS 7.0
#1
I'm currently playing with an installation of myBB and found that a number of the plugins have been designed for php 7.0.  In addition I've also noticed cPanel is going to deprecate php 5.0 at end of this year, so thought to figure out a way to upgrade my VPS php from 5.6 to 7.0.  I'm using VestaCP to manage my VPS since it is a free panel and also light in resources.  VestaCP comes automatically loaded with php 5.6.  Php 5.6 has worked very well for me until my experimentation with myBB so thought to use my cheap VPS to experiment with the upgrade and to see how my WordPress sites respond.  So far none of the WordPress backups that have been created with php 5.6 have failed with php 7.0 after their imports.  Even though my backup plugin warned me it could happen.  Mission successfully accomplished so far!

This is how I upgraded my php from 5.6 to 7.0.  Note my VPS OS is CentOS 7.0 64 bit. 

Step 1:  Install VestaCP and REMI

When you install VestaCP make sure to use the Installation Script Generator at the URL below (Advanced Install Settings) and to select the REMI repo option. 
https://vestacp.com/install/
[Image: UtjLvA8.png]
Step 2:  Check the version of your php and then update REMI:
php - v

yum --enablerepo=remi update remi-release

Step 3: Stop Apache and remove php:

service httpd stop

yum -y remove php

Step 4: Install php 7.0:

yum --enablerepo=remi-php70 install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring

Step 5: Stop old php and start php 7.0:

service php-fpm stop


service php70-php-fpm start

Step 6: Remove the old symblink php and create a new one:

rm /usr/bin/php

ln -s /usr/bin/php70 /usr/bin/php

Step 7: Restart Apache:

service httpd restart

Step 8: Check the php version:

php -v
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
6,084
04-13-2020, 06:45 AM
Last Post: Mashiro

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting