How to Upgrade to PHP 7

Terrance

Member
Registered
Joined
Jun 30, 2016
Messages
33
Points
0
I would like to know on how to upgrade to PHP 7, of course is I just want to upgrade php without updating other components as phpmyadmin, mysql, apache. It is possible? If I upgrade to php 7, do I need to update other components on my hosting server?
 

MooseLucifer

Well-known member
Registered
Joined
May 20, 2016
Messages
149
Points
28
Which OS are you using? if you are using one of OS's below then you can use commands as following
CentOS version 7.2
Code:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
CentOS version 6.7
Code:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
Fedora 23
Code:
wget http://rpms.remirepo.net/fedora/remi-release-23.rpm
dnf install remi-release-23.rpm
RHEL version 7.2
Code:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
subscription-manager repos --enable=rhel-7-server-optional-rpms
RHEL version 6.7
Code:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6
Remi-php70 repository activation
Run these depend on your OS is CentOS or Fedora
RHEL et CentOS
Code:
yum-config-manager --enable remi-php70
Fedora
Code:
dnf config-manager --set-enabled remi-php70
PHP upgrade
Code:
yum update
Now done!

You can check your PHP version with php -v
Code:
[root@moose ~]# php -v
PHP 7.0.8 (cli) (built: Jul 14 2016 07:58:28)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Moose pretty much nailed it, the easiest way is if your using CloudLinux with WHM. Each account can't select their own PHP version within cPanel.
 

Hostissimus

New member
Registered
Joined
Jul 19, 2016
Messages
8
Points
0
The best option to use CloudLinux + CageFS to be able to do that. It comes with many useful extensions as well for each account.
 
Newer Threads
Replies
21
Views
9,486
Replies
6
Views
3,985
Replies
11
Views
5,507
Replies
5
Views
2,109
fwh
Latest Threads
Replies
1
Views
26
Replies
0
Views
189
Replies
1
Views
40
Replies
2
Views
83
Similar Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top