How to change your PHP version


1) Click the File Manager button located in the Files section of cPanel.

2) Select the Home Directory and the Show Hidden Files option, then click Go.

Please move to the File Manager section of this article (see below).

File Manager

1) Click the New File button at the top-left hand side of the screen.

2) Enter “.htaccess” as the file name, and leave the location blank.

3) Right click the new htaccess file we just created.

4) Click the Code Edit option from the right click menu.

5) Add the AddHandler for the version of PHP you wish to use (located above). Then click the Save Changes button.

That’s it! Your whole account will now be using the version of PHP you specified in the htaccess file. If you wish to set the PHP version on a folder by folder basis, simply move/create/edit (if you already have one) the htaccess file in the folder you wish to change.


To switch to PHP 4.4:

AddHandler application/x-httpd-php4 .php

To switch to PHP 5.0:

AddHandler application/x-httpd-php5 .php

To switch to PHP 5.1:

AddHandler application/x-httpd-php51 .php

To switch to PHP 5.2:

AddHandler application/x-httpd-php52 .php

To switch to PHP 5.3:

AddHandler application/x-httpd-php53 .php

To switch to PHP 5.4:

AddHandler application/x-httpd-php54 .php

To switch to PHP 5.5:

AddHandler application/x-httpd-php55 .php

To switch to PHP 5.6:

AddHandler application/x-httpd-php56 .php

To switch to PHP 7:

AddHandler application/x-httpd-php70 .php

To switch to PHP 7.1:

AddHandler application/x-httpd-php71 .php

¿Le ha resultado útil este artículo?



  • Set Up URL Masking On Your Site

    At times, you may have a site created in a different location or directory and don’t want your visitors to see the full path to your files. Fort...

  • How To Disable Nginx Caching

    Click Login to cPanel under the Actions Menu Navigate to the Files section and click on File Manager Click the Settings icon...

  • How to Redirect HTTP Requests to HTTPS

    Below we are going to show you how to redirect all non-https request to use https. Why would you do this? This depends on what kind of site you are ho...

  • Current Loaded Modules

    Below we have listed the Apache modules that are loaded on all of our services. Updated February 24th/2015 actions_module alias_module asis_module ...

  • Error Messages Overview

    Error 400: Bad RequestError 401: Authorization RequiredError 403: ForbiddenError 404: Page Not FoundError 405: Method Not AllowedError 406: Not Accept...