Change PHP version for a specific domain on a hosting account
Author: admin admin Reference Number: AA-00391 Views: 33716 Created: 2013-05-09 08:48 Last Updated: 2024-02-24 12:35 0 Rating/ Voters

If one domain / script on your hosting account required a different version of php never fear !

----------------------------------------------------------------------

To change to version 5.2 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php52___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.3 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php53___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.4 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php54___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.5 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php55___lsphp .php .php5 .phtml
</IfModule>

----------------------------------------------------------------------

To change to version 5.6 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php56___lsphp .php .php5 .phtml
</IfModule>

---------------------------------------------------------------------

To change to version 7.0 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php70___lsphp .php .php5 .phtml
</IfModule>


---------------------------------------------------------------------

To change to version 7.1 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php71___lsphp .php .php5 .phtml
</IfModule>


---------------------------------------------------------------------

To change to version 7.2 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php72___lsphp .php .php5 .phtml
</IfModule>

---------------------------------------------------------------------


To change to version 7.3 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>

AddHandler application/x-httpd-alt-php73___lsphp .php .php5 .phtml

</IfModule>

---------------------------------------------------------------------


To change to version 7.4 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>

AddHandler application/x-httpd-alt-php74___lsphp .php .php5 .phtml

</IfModule>

---------------------------------------------------------------------

To change to version 8.0 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>
AddHandler application/x-httpd-alt-php80___lsphp .php .php5 .phtml
</IfModule>


---------------------------------------------------------------------


To change to version 8.1 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>

AddHandler application/x-httpd-alt-php81___lsphp .php .php5 .phtml

</IfModule>


---------------------------------------------------------------------


To change to version 8.2 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>

AddHandler application/x-httpd-alt-php82___lsphp .php .php5 .phtml

</IfModule>


---------------------------------------------------------------------


To change to version 8.3 of php add the following to a .htaccess file  in the folder where the domain / script exists :

<IfModule lsapi_module>

AddHandler application/x-httpd-alt-php83___lsphp .php .php5 .phtml

</IfModule>


As soon as these lines are added to the .htaccess file then that folder will then use the defined version of php !


Quick Jump Menu