Bei mehreren Domains oder Projekten in einem Account kann es nötig sein, unterschiedliche PHP-Versionen parallel einzusetzen. Hierbei haben Sie die Möglichkeit, PHP gezielt auf Verzeichnisbasis festzulegen.
Gehen Sie wie folgt vor, um die PHP-Version für ein bestimmtes Verzeichnis zu ändern:
- Erstellen oder öffnen Sie die
.htaccess-Datei in dem Verzeichnis, in dem Sie die PHP-Version anpassen möchten. - Kopieren Sie den gewünschten Abschnitt aus der untenstehenden Auswahl in die
.htaccess-Datei und speichern Sie die Datei.
PHP-Version wählen
PHP 8.5
AddType application/x-httpd-alt-php85___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 8.4
AddType application/x-httpd-alt-php84___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 8.3
AddType application/x-httpd-alt-php83___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 8.2
AddType application/x-httpd-alt-php82___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 8.1
AddType application/x-httpd-alt-php81___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 8.0
AddType application/x-httpd-alt-php80___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 7.4
AddType application/x-httpd-alt-php74___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 7.3
AddType application/x-httpd-alt-php73___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 7.2
AddType application/x-httpd-alt-php72___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 7.1
AddType application/x-httpd-alt-php71___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 7.0
AddType application/x-httpd-alt-php70___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 5.6
AddType application/x-httpd-alt-php56___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 5.5
AddType application/x-httpd-alt-php55___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 5.4
AddType application/x-httpd-alt-php54___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 5.3
AddType application/x-httpd-alt-php53___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP 5.2
AddType application/x-httpd-alt-php52___lsphp .php5 .php4 .php .php3 .php2 .phtml
PHP-Version auf Accountbasis
Alternativ setzen Sie die Standard-PHP-Version für den gesamten Account in cPanel. Lesen Sie dazu unsere Anleitung PHP-Version und Module ändern .

