Using cPanel to configure VPS for Joomla 3.7x and PHP 7.1

bosprickly

Registered
Dec 9, 2016
1
0
0
Los Angeles, CA
cPanel Access Level
Root Administrator
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.64.0.36
/var/cpanel/envtype:virtuozzo
CPANEL=release

Hello,
I am not very experienced with ssh and server management, however I am a front-end dev and have had to get involved with this for a project. I have a site using Joomla 3.7.4 that has been redeveloped on MAMP running PHP 7.1. Our current (VPS) server is running PHP 5.6, with this new redevelopment of the site I need to set up a live and staging area and Git.

I used easyapache4 to install PHP 7.1 and created a subdomain on the server to hold the staging site. Since the current live site is running PHP 5.6, and the one about to be transferred to the staging site is using PHP 7.1, I need to initially have these two domains (maindomain.com and staging.maindomain.com) running 5.6 and 7.1 respectively.

When I went to change the PHP version for staging, it did say "inherit" next to the subdomain. I went ahead and selected staging.maindomain.com and switched it's PHP version to 7.1. This caused the main site to break/not appear on the front end. In the cPanel multiple php versions screen, staging.maindomain.com was set to PHP 7.1 and maindomain.com was set to 5.6, the main site still did not work. Switching back to 5.6 on both domains did not fix this either. I did not have the new site loaded in the staging server yet, and immediately reverted to a disk image so the main site would be back up and running.

Being a Joomla site, I went to the joomla community and they believe my PHP 7.1 install was missing specific PHP modules needed to run the Joomla site properly; however, I cannot find a list of the modules required for Joomla 3.7x. So I have a few questions that I'm hoping can be answered here:

1. What do I need to do to have different versions of PHP for this staging domain and the main site, and once the new staging site is ready to push live, what is the recommended order of setting the maindomain.com to PHP 7.1 (at this point both staging and maindomain would be running PHP 7.1)?

2. What modules do I need to install for Joomla 3.7x to this PHP version 7.1?

3. I'm using SSH to talk to the server, so if you can also help me with the commands to accomplish this I would appreciate it.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
When I went to change the PHP version for staging, it did say "inherit" next to the subdomain. I went ahead and selected staging.maindomain.com and switched it's PHP version to 7.1. This caused the main site to break/not appear on the front end.
Hello,

Changing the PHP version for a subdomain should not result in issues for the parent domain name. Were you able to notice any specific error messages in the website's UI, the error_log file in the document root of the website, or in the Apache error log (/usr/local/apache/logs/error_log) when this happened?

Thank you.