How to change PHP version on your website.

Sometimes clients ask us about the PHP version running on server and whether there is an ability to switch between PHP versions or not. Fortunately, we support multiple PHP versions on our servers so you can use your preferred one on your website. You can even change versions in different directories on your account. That ensures the best compatibility and performance for most software and applications on the internet.


To change your PHP version:
  • Login into your cPanel account and open the File Manager. (Make sure to select Show Hidden Files)
  • Locate the directory that you wish to change PHP version for. If you are not sure, open the public_html directory.
  • Create a new file and name it .htaccess
  • If .htaccess file already exist, click on it and press Edit from the top menu.
  • Place the following code in your .htaccess file: AddType application/x-httpd-php56 php
  • Press Save Changes.
The above code indicates PHP version 5.6. If you wish to use another version replace the code with the following:

PHP 5.3
AddType application/x-httpd-php53 php

PHP 5.4
Default version running on servers. No code required.

PHP 5.5
AddType application/x-httpd-php55 php

PHP 5.6
AddType application/x-httpd-php56 php

If you're looking for a specific PHP version, please open a ticket with our technical support and we'll be happy to assist you further.
  • 237 Users Found This Useful
Was this answer helpful?

Related Articles

How to login to FTP for cPanel accounts.

In order to login to your FTP account, you have to download a FTP client software. We recommend...

Accessing your website directories and files.

Login into your cPanel account. Under the Files tab find the File Manager and click on it. A...

Blocking access to multiple files using htaccess

You can restrict access to multiple files by inserting the following code in your. htaccess file....

How to change your default mail editor

Our hosting accounts have with 3 mail browsers included in your cPanel: Horde Mail, Roundcube,...

How to create a sub-domain on your domain.

Login to you cPanel account. Under the Domains tab click on Subdomains. In the subdomain...