Update to PHP 7.x, but leave 5.6 as default

Operating System & Version
CentOS 6.10 xen hvm
cPanel & WHM Version
v78.0.49

GoWilkes

Well-Known Member
Sep 26, 2006
670
31
178
cPanel Access Level
Root Administrator
One of my hosted sites is requiring PHP 7.x, but I haven't updated from 5.6 because MySQL was deprecated, and over 100 sites on the server use MySQL. But I recently discovered that I can assign a specific PHP version to each domain under MultiPHP Manager!

The question is, how do I update to 7.x but leave ALL of the domains at 5.6? Then I could just select the one domain that needs 7.x and change its PHP version, while not risking the others.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,295
313
Houston
Hello,

You would just go to WHM>>Software>>EasyApache and install the PHP version/s you need along with any PHP extensions you'll want for that version. Once that is complete you can assign the PHP version to any domain you choose
 

GoWilkes

Well-Known Member
Sep 26, 2006
670
31
178
cPanel Access Level
Root Administrator
Right now they all say "Inherit", so I guess that I need to change all of them before the update.

For future readers, I figured out how to do what I'm wanting. Go to MultiPHP Manager, select all of the domains, and in the upper right select "PHP Version: PHP 5.6" (or whatever) and apply. This will change them from Inherit to 5.6.

Then you can update PHP to 7.x, but all of the domains will be manually assigned to 5.6. Then you can change them one at a time back to Inherit.
 
  • Like
Reactions: andrew.n

GoWilkes

Well-Known Member
Sep 26, 2006
670
31
178
cPanel Access Level
Root Administrator
On a slight tangent... I've installed 7.3 and 7.4, and still need 5.6, but is there any reason to NOT uncheck 5.4 and 5.5 from Easy Apache to remove them?

Does this automatically remove any extensions that they used that no longer apply to 5.6, 7.3, or 7.4? Or do I need to hunt them down manually?
 

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
Other than they are outdated, vulnerable and not supported for like 5 years or so nothing :D so If you want to keep the server up to date I would strive to move the accounts as high PHP versions as possible. Currently PHP 7.2,7.3 and 7.4 is supported but as far as I remember 7.2 will be outdated by November as well.

If you uncheck (remove) 5.4 or 5.5 that will remove only that version from the server along with all extensions installed for those versions. It will not touch any other PHP versions or their modules. They are installed separately.
 
  • Like
Reactions: GoWilkes

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
oh and btw don't forget that CentOS 6 will be EOL (end of life) in November too :(
 

MindServer

Well-Known Member
Mar 18, 2020
236
32
28
Spain
cPanel Access Level
Root Administrator
oh and btw don't forget that CentOS 6 will be EOL (end of life) in November too :(
You can extended the CentOS 6 life with KernelCare, they sent newsletter where says will provide security patches more time after end of life. Too you can update CentOS 6 to CloudLinux 6, they will have extended EOL until 2024, check this: In 2020, Are you Ready for RHEL/CentOS 6 EOL?

Have a nice day!
 

GoWilkes

Well-Known Member
Sep 26, 2006
670
31
178
cPanel Access Level
Root Administrator
Yeah, that's a pretty big concern :-( I'm not all that comfy with updating the OS on a live server, so the plan WAS to order a new server and just move everything over piecemeal. But then COVID came along and wiped out 90% of my revenue stream, so now I really have no idea what I'm going to do about it.
 
  • Sad
Reactions: cPanelLauren

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
Unfortunately there is no way to directly upgrade from 6 to 7 so the only way is to get a new server or backup everything, reinstall and restore. You still have time till November and I think 1-2 extra months will not hurt much and even after as @MindServer mention there is the CloudLinux option so not everything is lost :)

Stay safe!