Use different PHP versions (multi-PHP) on different domains

Multi-PHP lets you use a different PHP version for each domain on your hosting account. You can assign a PHP version in the .htaccess file of your hosted domain name.

1. Open and follow the steps in this guide: Access and modify your .htaccess file

2. In your domain .htaccess file, place⚠️ the snippet for the PHP versions provided below you want to use on it

⚠️ Important:

  • Each .htaccess file has distinct and varied content
  • Place your PHP code snippet block snippet at the top of the .htaccess file
  • If the top section is full, press ‘Enter’ or ‘Return’ within the file to create space, shifting other snippets downward
  • The PHP code snippet block snippet needs to be on a separate line to function properly

To provide a visual, here is an example of the PHP version 7.2 code snippet placed within a .htaccess file:

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