Changing your PHP Version in cPanel

The latest versions of cPanel make it easy to choose what version of PHP your site is using. With just a few clicks, you can switch between different versions and even use different versions across sites in the same cPanel. This is especially helpful when upgrading older sites, troubleshooting, or dealing with third-party applications. Let’s take a look at how to make the most of PHP on all types of servers!

PHP Versions and Server Types

Our SysAdmins install the latest versions of PHP on our Shared, Reseller, and cPanel-based WordPress servers after testing and troubleshooting. The ‘default’ version of PHP for newly created sites is often one or two versions behind for the sake of stability— but feel free to update to the latest version as soon as it is available!

With VPS and Dedicated Servers, we trust you and your SysAdmins to manage PHP installation and updates. If you need help, though, our 24/7 Technical Support team is happy to install newer versions of PHP at your request!

If you have a VPS or Dedicated Server, newer versions of PHP may need to be installed manually.

cPanel’s MultiPHP Manager

Just a few years ago, managing different cPanel PHP versions was an all-or-nothing ordeal. Older tools would change the PHP version for every site on a cPanel at once. Configuring different individual sites required awkward workarounds using .htaccess files. The latest versions of cPanel introduced a new tool, MultiPHP Manager, which simplifies the process. Click on the MultiPHP Manager icon in the Software section of cPanel to get started!

displays MultiPHP Manager icon in cPanel

Please Note: be sure to click on MultiPHP Manager and not MultiPHP INI Editor. The INI Editor is a different piece of software that helps you fine tune your PHP settings on individual sites.

Manage The PHP on Your Sites

Once on the MultiPHP Manager page, you will see a listing for every site on the cPanel, including subdomains. Changing the PHP used on a site or sites is simple:

displays a standard MultiPHP Manager setup

  1. Check the box for the site or sites you wish to update
  2. Select the desired PHP Version from the drop-down menu
  3. Click ‘Apply’

That’s all it takes to change the PHP version used on any site you choose. If you are having issues with a site and want to double-check the version of PHP in use, remember that you can always set up a phpinfo page for the site as well.

Very old versions of cPanel on VPS or Dedicated Server plans may not have multiPHP Manager. Update your cPanel installation on a VPS or a Dedicated Server today and get the latest available tools!

Thoughts on “Changing your PHP Version in cPanel

  • WordPress wants me to update to php 7.3, but I am getting multiple errors:

    Warning: Use of undefined constant auto – assumed ‘auto’ (this will throw an Error in a future version of PHP) in /home/jeffre27/public_html/blog/wp-content/themes/design-services-standard/functions.php on line 105

    Warning: Use of undefined constant – assumed ‘ ‘ (this will throw an Error in a future version of PHP) in /home/jeffre27/public_html/blog/wp-content/themes/design-services-standard/header.php on line 147
    FAQ

    (and again on each page of the site)

    Only by reverting back to 5.6 do I get the errors to disappear.

  • I updated to 7.2, it’s saying it did, on the host it confirms, but when I try to install Laravel it tells me it found 7.1. Any advice as to what’s going wrong here?

    • Hello Sven,

      Thank you for your comment. I am happy to assist with your Laravel installation issue at this time. Based on the information provided it appears that the issue may be related to your composer configuration. I recommend ensuring that composer is fully updated and then trying to run the Laravel installation once more.

      Please let us know if you have further questions, we are happy to help!

      Best Regards,
      Alyssa K.

      • I am having the same issue (trying to install Laravel through softalicious and it is finding php 7.1 instead of 7.2). How do we go about ensuring that composer is updated/configured properly?

      • Hello Erik,

        Thank your reply. To ensure that composer is updated, use the self-update command.

  • Upgrading PHP from version 5.3 to 5.6 breaks my website at subdomain
    www.klamathconservation.org/science_blog/ (using concrete5 CMS) with
    Error 500 – Internal Server Error.
    Other subdomains www.klamathconservation.org/scienceblog (wordpress
    CMS) do work after the upgrade.
    php error_log shows errors such as
    Unable to load dynamic library
    ‘/usr/local/lib/php/extensions/no-debug-non-zts-20060613/homeloader.so’
    – /usr/local/lib/php/extensions/no-debug-non-zts-20060613/homeloader.so:
    cannot open shared object file: No such file or directory in Unknown
    on line 0
    Do I need to edit (or delete) the php.ini in either the root or subdomain directory? both still have references to paths to php53

    • Hi Carloscaroll – I took a look at your website and it does appear to be working at this time. I couldn’t duplicate the error you’re seeing. Make sure to clear your browser cache and let us know the problem persists. Please send us a URL that is generating the error.

    • It depends on your specific site and how it was built. You can try as a test, then switch back if it causes issues. Another option is to have your website Developers review your site to ensure it is compatible.
      Thank you,
      John-Paul

  • If you are an InMotion Hosting customer and you’re not seeing the different PHP versions, then you should contact our live technical support team to ask if it’s possible to have the PHP switcher applied to your account. In some rare instances, the switcher may not be available to you. The live tech support team will be able to review the issue and determine the best way to provide you a solution. You can contact our live support team using email/chat/phone – the contact information is available at the bottom of this page.

  • I recommend you contact the CMS developer and keep the website at the PHP version that allows the website to work correctly.

  • What are looking for in the php/apache logs and how do we know what setting to use for .htaccess? Also, where are these logs?

    • The PHP logs are generally in the root of your website files, but it may also depend on the application you are using. The settings used in .htaccess depends on the application you’re trying to use. If you use the cPanel’s switcher for PHP, you don’t have add code in your .htaccess file for the PHP version.

      The Apache log is not available to you unless you have root access with a VPS or dedicated server account. If you have neither, then you will need to contact our live technical support team.

    • Some website can run on various PHP versions. However, in order to know for sure, you should check with the documentation for the software you used to build/maintain your website. As long as the PHP version you want to use is supported, then you shouldn’t experience issues with your website for changing the version.

  • Hi guys, i need help with my version of php i need update to greater than 5.5 version but i can’t do it from my cpanel. There is no option to do that, what can i do?

    • If you don’t see the option to do it in cPanel, then you contact our live technical support team. They should be able to add the option in your cpanel so that you can switch it as needed. The live tech support team contact info is at the bottom of this page.

  • Hi Guys, 

    I just updated our Php version today usingthe provided imagesand steps above and it causes our website to display this.

    Error 500 – Internal Server Error

     

    An error was encountered while processing your request. Typically this is a temporary condition. Please contact the web site owner for further assistance.

    Any idead how to fix this.? 

    • The most common cause of this when upgrading the PHP version is having invalid PHP values defined in the .htaccess file, permissions, or the website not being compatible with the version of PHP the site has been changed to. I would recommend reviewing your Apache and PHP error logs to get more information about why it is showing the error.

  • You should be able to change your PHP version to 7 by following the above guide. Let us know if you are experiencing any issues or errors.

    Thank you,
    John-Paul

  • hello dear friend i need for help i upload my desgin of website in new cpanel but the new cpanel is new version i change virsion from cpanel some old version but not solved my problem please help me this is my website www.ayil.af

     

    how can change php version from sorces cod of php

     

    this is from old cpanel .htaccess

     

    RewriteEngine on

     

    RewriteCond $1 !^(index\.php|nayil|bootstrap|images|frontend|js|user_guide|css|fonts|vendors|froala|assets|media|robots\.txt)

     

     

    RewriteRule ^(.*)$ /index.php/$1 [L]

     

    and

     

    php.ini

     

    ini_set(‘extension’, ‘php_fileinfo.so’);

     

    but now i can’t work in new version of new cpanel 

  • Hi,

     

    is there any option to multiple Php versions at a time

    Ihave a application that support only php 5.3  and another one i want to use is 5.4 above

    what should in such cases?

  • Thank you for this support!  I just updated my PHP to the minimum update of 5.6 – I am not a coder, so I’m ignorant as all heck. How can I confirm that my pages (site) is correctly updated to avoid crashing when the system udpates on August 7th?  Once I can idenify how to confirm my site is fully updated, and working, I will move foward fully updating the PHP. 

    PS – I’ve gone into my PHP files and opened them, but I don’t see any indication that would identify to me what type of PHP has been applied. 

    • PHP is applied account or sometimes site wide and not into the specific files themselves. If you updated php in cPanel to a newer version you should be fine. I’d suggest adding a php info page so you can see what version of PHP you are actually running.

    • Hello Karen,

      It will only interrupt visitors if the change affects the way your site operates. If the change does not affect the code of your site, then it should be transparent to the user.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • Hi.

    I was able to change my PHP version without any problem but this hasn’t change the system PHP version. Is it normal? Will it have some impact to me?

    Thanks’

    • Your system has multiple PHP versions available. The PHP Switcher only changes the PHP version running on your specific account.

      Thank you,
      John-Paul

  • Tim Sisson, Thank you! This worked perfectly ^_^ and for those of you that updated your PHP and your site still doesn’t work? Try just changing the update version. I thought mine updated to the last update, 7, but no, I had to “update” to version 5.3 for mine to work. 

    • If you have a VPS/Dedicated account you will not have the same PHP Configuration option in your cPanel. But you can change your PHP version manually in a number of different ways. Or, you can contact our live support to help you. We can install the “PHP Switcher” (as seen above) in your cPanel, also through a verified support contact request.

  • hi

    i was using new version of php.but my live server is using old version.in live server it doesnt work.shows an error. can any one help

  • Yes it does work when i use php version 5.3 or 5.3.  it doesn’t work when i use php version 5.4 5.5 5.6. moreover I am an customer on inmotionhosting.com. I would like to get some helpf from you. can i talk you through email?   by the way  this is my domain information. glassman.co.kr  

  • Hi, when i upgrade the php version higher than 5.3,  my wordpress woocommerce plugin and pages are not working. 

    These are the error messages:

    [Fri Nov 20 09:42:12.858296 2015] [:error] [pid 23101:tid 140133080975104] [client 216.54.31.82:50819] Failed loading /opt/php55/lib/php/extensions/no-debug-non-zts-20121212/:  /opt/php55/lib/php/extensions/no-debug-non-zts-20121212/: cannot read file data: Is a directory

    [Fri Nov 20 09:42:12.858489 2015] [:error] [pid 23101:tid 140133080975104] [client 216.54.31.82:50819] Failed loading /opt/php55/lib/php/extensions/no-debug-non-zts-20121212/ZendGuardLoader.so:  /opt/php55/lib/php/extensions/no-debug-non-zts-20121212/ZendGuardLoader.so: cannot open shared object file: No such file or directory

    How can i solve this issue? 

     

    My wordpress and woocommerce and theme version are the newest one. i updated all of them. 

    • Hello Tate,

      Sorry for the problem with Woocommerce and WordPress. Are you saying that your installation works with the earlier version of PHP? Have you tried to use the default server php.ini file (comment out your current PHP.INI – by default the server one should load)? It appears that you’re getting an error on loading the ZenGuardLoader.so because it can’t be found. That file is generally on our servers – its path is defined in the PHP.INI file. If it’s unable to find it based on a different PHP.INI then it will fail with this error. If you are an InMotion customer, can you provide the domain name? We can investigate it in more depth if you provide a URL or account information.

      I hope this helps to answer your question, please let us know if you require any further assistance.

      Regards,
      Arnel C.

  • hello edens,
     thanks for your reply.
     
     
    these links are showing blank pages on every new 2nd hour.
    1st hour its working and 2nd hour its not working.
    3rd hour its working and 4th hour its not working.
    its like a loop.
     
    https://example.com/
    https://example.com/home/
    https://example.com/directory/
    https://example.com/allrcb/
     
     
    these links are working always every hour.
    https://example.com/support/
    https://example.com/advertise
    https://example.com/articles
    https://example.com/news
     
     
    thanks again for your timing.
    • Shawn,

      I’m sorry that your site is not working under the changing PHP version conditions. We do not understand what you’re trying to accomplish by switching on an hourly basis. We recommend that you stick with ONE version of PHP and make ALL of your code work in that version. Additionally, PHP does deprecate and eventually remove commands based on version. So, it’s possible that the problem you’re seeing may be related the difference in versions. The coding to resolve this issue may require a developer/programmer, but that issue is beyond our scope of support. We do apologize if this is not a satisfactory answer for you, but typically if a page or two isn’t working, while others are at a certain point in time, then it points to the code on the page.

      Kindest regards,
      Arnel C.

  • hy scott,

         thanks for your reply.

    dear my site working well untill i add more than 10 website in my site

    allhyipinvestor.com

     

    if i add less than 10 website in my site.

    then my site always working well and active.

     

    if i add more than 10 websites then my site on and off hourly basis.

    1 hour working well and active .

    2nd hour blank white page show.

    3rd hour working well and active .

    4nd hour blank white page show.

    and so on its like a look.

    i make it active manually by changing php version or add this code in .htaccess file.

    AddHandler application/x-httpd-php52  .php52 .php

     

    1st hour i add this coding in .htaccess file 

    and second hour i need to remove that coding for active my site.

    its like a loop also.

     

    so thats why i am asking for condition.

     

    if new hour start then 

    or 

    if website in off then

     

    RewriteEngine on

    #RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^.*$ – [NC,L]

    RewriteRule .* index.php [L]

     

     

    else

     

    RewriteEngine on

    #RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^.*$ – [NC,L]

    RewriteRule .* index.php [L]

     AddHandler application/x-httpd-php52  .php52 .php

     

     kindly chat with me for further i am online

    allhyipinvestor.com.

    [email protected]  

     

    • Hello Shawn Roy,

      Can you provide us a url that is currently giving a blank page so we can take a look into the problem? Apache will either work not with what you have configured, it does not change over time.

      Best Regards,
      TJ Edens

  • hello friends,

           i want to change my php version automatically on every hour by .htaccess file.

    1st hour i want 5.3

    2nd hour i want 5.4

    3rd hour i want 5.3 

    4th hour i want 5.4

     

    any master can make the coding for my .htaccess file. or you have any solution for this.

    you can use else,if statement also in this coding.

    this is my .htaccess coding.

     

    if new hour start then

     

    RewriteEngine on

    #RewriteBase /

     

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^.*$ – [NC,L]

    RewriteRule .* index.php [L]

     

     

    else

     

    RewriteEngine on

    #RewriteBase /

     

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^.*$ – [NC,L]

    RewriteRule .* index.php [L]

     

     

    AddHandler application/x-httpd-php52  .php52 .php

     

     

     

     

    • Hello Shawn,

      You are better off writing either a php or pythong script to change your PHP version and set it to a cron job to run hourly. What type of scenario would require this type of setup?

      Kindest Regards,
      Scott M

  • Hi,

    I am trying to install open-classified but I have the following error (even after swithing the php version to 5.5 in Cpanel)

    • Required PHP version greater than equal to 5.5.0 AND found version is : 5.4.40

     

    Help Pls.

    Thanks.

    • Hello Ghislain,

      Thank you for contacting us. We are happy to help, but will need some additional information.

      Did you verify the PHP version is changing with a PHPinfo page?

      How are you installing Open-Classified?

      If your problems persist, it may be beneficial to contact Live Support, so they can test your specific account.

      Thank you,
      John-Paul

  • Hi,

       If I change my PHP version from 5.4 to 5.5, do I need to get a new php.ini file (which is currently on v5.4)?

    I am facing a peculiar problem for which I want to try higher php version:

    For initial couple of days the below PDO code worked fine but suddenly it is giving error.

    $this->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

     

    I don’t know what config has changed but my code did not change.

    Regards,

    Sagarme

    sagarrakholiya.com

    • Hello,

      It is possible you need to make some changes in your php.ini file based on version. The main server copy gets this done automatically, but you would need to change any php.ini files that are in individual cPanel accounts.

      Kindest Regards,
      Scott M

    • Hello ray,

      Thank you for your question. Yes, it can affect your website, depending how it was developed/coded.

      For example, if you are using a software that is only compatible with PHP 5.3, changing to PHP 5.5 may cause errors.

      Thank you,
      John-Paul

  • Hi,

       If I change my PHP version from 5.4 to 5.5, do I need to get a new php.ini file (which is currently on v5.4)?

    I am facing a peculiar problem for which I want to try higher php version:

    For initial couple of days the below PDO code worked fine but suddenly it is giving error.

    $this->_pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

     

    I don’t know what config has changed but my code did not change.

    Regards,

    AK

    • Hello Amal,

      Sorry for the problem with the PDO code. Servers are continually updated to keep them current, so it’s possible that older PHP code scheduled for deprecation could be causing the issue. You do not need to get a different PHP.INI file if you’re switching to PHP 5.5. If you don’t have specific settings in your local PHP.INI file, you can also re-name it and your account will use the server PHP.INI file.

      If you continue to get errors, please indicate your domain name and we can research the issue for you in more depth.

      Kindest regards,
      Arnel C.

    • Hello Vikky,

      Thank you for your question. Yes, by following the guide above, you can change your account to use PHP 5.5.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-POaul

  • I noticed you said php 5.3 must be installed. I have 5.4. So I need to downgrade to 5.3 in whm via easyapache and this switch appear in my cpanel accounts automatically?

    • Gabriel,

      Yes, in order to have the PHP switcher put into place, the DEFAULT version of PHP that would be installed would need to be 5.3. However, that doesn’t mean that you’re stuck with 5.3. You can simply switch to 5.4 or higher.

      Regards,
      Arnel C.

    • Hello Gabriel,

      Thanks for the question. The switcher can be added, but it would need to be done by our systems people. You would need to submit a support ticket requesting that it be installed. Please be aware that this switcher requires that PHP 5.3 be installed as the default version of PHP on the server.

      I hope that helps to clarify the issue!

      Regards,
      Arnel C.

  • Can you update the article and mention that sometimes the switcher doesn’t work, and that you need to manually edit your .htaccess to get the job done? I just had to add the following to my .htaccess file because cPanel failed to do it:

     

    AddHandler application/x-httpd-php55 .php

    • In 99% of cases, the PHP switcher will work just fine, however, depending on some account configurations, you will need to adjust it manually.

  • Is there a lag time before the newly selected version takes effect? Im on a shared account, and I changed the PHP version to 5.4, but cPanel is still reporting my php version as 5.3.28 and so does my WordPress installation.  So far it’s been about a half hour since I made the change in the PHP configuration as outlined above. And when I return to the PHP Configuration Page, the dropdown is set to 5.4, but everything else seems to indicate that I’m still on 5.3

    • The changes will be instant. Sometimes, depending on your existing .htaccess file, the PHP version changer can fail to properly write the needed line in which you will need to add this manually. The following article will provide you with the line that you would need to add to your .htaccess file:

      Using multiple PHP versions on one account

      Simply place the appropriate line for your desired PHP version into the .htaccess file of your home directory and it will then take effect.

  • When will PHP 5.5.12 be supported?  It has a bunch of security patches.

     

    The maintainers of PHP have released two new versions of the scripting language that fix a number of bugs, including a pair of vulnerabilities related to OpenSSL. Versions 5.4.28 and 5.5.12 both contain that important patch, as well as fixes for more than a dozen other vulnerabilities.

    The fix for the OpenSSL flaws is in both PHP 5.4.28 and 5.5.12. Both versions also include a slew of other bug fixes, one of which is for CVE-2014-0185, a privilege escalation flaw. The bug could allow an attacker to run arbitrary code in some situations.

    • We specifically patch all servers to ensure vulnerabilities such as this are not an issue. Rest assured at any disclosed vulnerabilities are immediately addressed across all environments.

Was this article helpful? Let us know!