Knowledgebase: PHP
MODIFY THE PHP VERSION ON YOUR DOMAIN
Posted by Arvixe Admin on 09 November 2015 09:16 AM

You can now modify the PHP version on your domain super easily, if you're a current Shared hosting customer, with the PHP Selector module in cPanel.

With PHP Selector

WHAT IS PHP SELECTOR?

PHP Selector resides in your cPanel dashboard. You can modify the PHP version of your domain, sub-domains or parked domains. 

The modules presents all locally installed PHP versions for the user to select from. And as a bonus, if your server is ever moved from PHP 5.3 to PHP 5.4 default for instance, you will see it continue to work seamlessly. This is all due to our updated PHP stack scripts that preserve legacy handler types with the PHP54 handler set.

MODIFY IT

To modify the PHP version on your domain:

  1. Log in to your cPanel account

  2. Click the PHP Selector icon in the Software/Service section near the bottom

  3. Select your preferred PHP version in the PHP Version dropdown list

  4. Click Set

 


​Overall, this module is more about convenience than it is about being fancy. It makes switching your PHP version so easy!
 

Use.htaccess

MODIFY IT

You can also control the PHP version your sites or specific paths use with a htaccess file if you prefer a more granular/advanced level of control. The below modification can be placed in an accounts 'public_html/.htaccess' file to enable PHP 5.5 or 5.3 for the entire account, or in a .htaccess of a specific directory (like 'public_html/wordpress/.htaccess') to enable the desired PHP version under that directory tree only.

To enable PHP 5.5 or 5.3, you must add one of the following htaccess options:

AddType application/x-httpd-php55 .php

Or

AddType application/x-httpd-php53 .php

The binary path to the PHP 5.5 and 5.3 installations, should you require it for executable PHP scripts or cronjobs, is located at:

/usr/local/php55/bin/php

and

/usr/local/php53/bin/php

As with the existing PHP 5.4 setup, when you enable PHP 5.5 or 5.3, it will respect any custom php.ini settings you may have under your account. In addition, all standard PHP modules and extensions from the existing PHP 5.4 installation are default enabled in PHP 5.5 and 5.3 to ensure the best compatibility possible.

 
(20 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).