Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Changing default PHP version

Discussion in 'EasyApache' started by flashweb, Jan 1, 2019.

  1. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Currently PHP 5.6 is set as default on my server, many sites already using it.

    I want all new web sites i create on this server use PHP 7.2

    Now if i try change default PHP version, then it will switch all current sites to new default PHP version, i don't want this as it will break many sites.

    Anyway i can have PHP 7.2 for all newly created cpanel accounts ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,908
    Likes Received:
    127
    Trophy Points:
    368
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you need to set the current sites to php 5.6 (not inherent)
    then switch your inherent/default php to 7.2
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  3. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Changing all sites manually is not practical as most sites set to inherit and i need this done on multiple servers.

    Anyway i can do this in command line or edit some file, so it will change default PHP version for new sites with out altering current sites PHP version ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,908
    Likes Received:
    127
    Trophy Points:
    368
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you can change them all at once VIA WHM multi php handler
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,248
    Likes Received:
    478
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    As suggested by @dalem to change the version of PHP for new accounts (this changes the system default as well) go to WHM>>Software>>MultipPHP Manager and set the "System PHP Version" to the version you'd like all the accounts that are set to inherit as well as new accounts to be set to.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice