Multi-PHP allows you to use different versions of the PHP programming language for different domain names on your hosting account. Multi-PHP can be beneficial because it lets older websites run on older PHP versions, while newer websites and the hosting account in general can run on the latest version of PHP, without needing to overhaul entire websites in the immediate term.
You can enable multi-PHP from your hosting control panel.
1. For the domain name you want to enable multi-PHP, go to edit the .htaccess file
2. Once in your domain name’s .htaccess file – you can add the code snippet to enable the PHP version you’d like, picking from the AddType versions available below. Once you save changes in your domain name’s .htaccess file, the selected PHP version will be applied automatically.
PHP version 5.6
AddType application/x-lsphp56 .php5 .php4 .php .php3 .php2 .phtml .htm .html
PHP version 7.2
AddType application/x-lsphp72 .php5 .php4 .php .php3 .php2 .phtml .htm .html
PHP version 7.4
AddType application/x-lsphp74 .php5 .php4 .php .php3 .php2 .phtml .htm .html
PHP version 8.0
AddType application/x-lsphp80 .php5 .php4 .php .php3 .php2 .phtml .htm .html
PHP version 8.1
AddType application/x-lsphp81 .php5 .php4 .php .php3 .php2 .phtml .htm .html
PHP version 8.2
AddType application/x-lsphp82 .php5 .php4 .php .php3 .php2 .phtml .htm .html