Skip to main content

How can I change user PHP Version in Shell

Comments

3 comments

  • cPanelLauren
    Hi @Burti The WHMAPI1 php_set_vhost_versions call will allow you to do this. You can also modify other PHP configurations but I just did the following to change one of my domains PHP versions: whmapi1 php_set_vhost_versions version=ea-php55 vhost-0=testdomain.tld
    More information can be found in the documentation here: WHM API 1 Functions - php_set_vhost_versions - Developer Documentation - cPanel Documentation Thank you,
    0
  • Burti
    Thanks for reply! But I want to change in file but file in where?
    0
  • cPanelLauren
    Hi @Burti This section in the user's .htaccess file is what controls this setting: # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php55" package as the default "PHP" programming language. AddType application/x-httpd-ea-php55 .php .php5 .phtml # php -- END cPanel-generated handler, do not edit
    If you change the AddType to a different php version you're essentially changing the php version for the domain. Thank you,
    0

Please sign in to leave a comment.