08-02-2018, 11:23 PM
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/
Step 2: Check the version of your php and then update REMI:
Step 3: Stop Apache and remove php:
Step 4: Install php 7.0:
Step 5: Stop old php and start php 7.0:
Step 6: Remove the old symblink php and create a new one:
Step 7: Restart Apache:
Step 8: Check the php version:
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/
Step 2: Check the version of your php and then update REMI:
Code: (Select All)
php - v
Code: (Select All)
yum --enablerepo=remi update remi-release
Step 3: Stop Apache and remove php:
Code: (Select All)
service httpd stop
Code: (Select All)
yum -y remove php
Step 4: Install php 7.0:
Code: (Select All)
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:
Code: (Select All)
service php-fpm stop
Code: (Select All)
service php70-php-fpm start
Step 6: Remove the old symblink php and create a new one:
Code: (Select All)
rm /usr/bin/php
Code: (Select All)
ln -s /usr/bin/php70 /usr/bin/php
Step 7: Restart Apache:
Code: (Select All)
service httpd restart
Step 8: Check the php version:
Code: (Select All)
php -v