Support Center

Modify the PHP Version on Your Domain

Last Updated: Jul 20, 2015 01:08PM CDT

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

    PHP Selector


‚Äč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.

 

See also Use Alternate PHP Installs

b2e1da5554fae60a8baf40cecd3cb9f6@asmallorange.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete