Support

Hosting

Email

Domains

Website

Admin

Set the PHP Version for a Specific Directory

How can you define the PHP version on a single directory?
In order to define a specific PHP version, the desired PHP version must be available on your hosting package. To check the PHP versions of our hosting packages, click this link and check the details of your package.

Instructions:

You can define the desired PHP version individually for each directory.

To do this, create or edit the .htaccess file in the corresponding directory and add the following line, depending on the desired PHP version:

PHP Version 8.2:
FCGIWrapper /home/httpd/phpwrapper/php82-fcgiplus .php

PHP Version 8.1:
FCGIWrapper /home/httpd/phpwrapper/php81-fcgiplus .php

PHP Version 8.0:
FCGIWrapper /home/httpd/phpwrapper/php80-fcgiplus .php

PHP Version 7.4:
FCGIWrapper /home/httpd/phpwrapper/php74-fcgiplus .php

PHP Version 7.3:
FCGIWrapper /home/httpd/phpwrapper/php73-fcgiplus .php

PHP Version 7.2:
FCGIWrapper /home/httpd/phpwrapper/php72-fcgiplus .php

PHP Version 7.1:
FCGIWrapper /home/httpd/phpwrapper/php71-fcgiplus .php

PHP Version 7.0:
FCGIWrapper /home/httpd/phpwrapper/php70-fcgiplus .php

PHP Version 5.6:
FCGIWrapper /home/httpd/phpwrapper/php56-fcgiplus .php

Via NetConfig
1. Log into NetConfig.

2. Click on File Manager.

3. Go to the directory where you want to define a specific PHP version.

4. Right-click in the empty space and select New File.

5. Create an .htaccess file and click OK.

6. When the text editor opens, add the desired PHP version code (You can find the code here). In this example we are using PHP version 7.4. Then click on Save.

7. Done! This directory will now always run with PHP version 7.4.

Via FTP
1. Log in to your FTP program. In this example we use FileZilla. To find your FTP credentials, go to this link. 2. Go to the directory where you want to define a specific PHP version.

3. Right-click in the empty space and select Create New File.

4. Create an .htaccess file and click OK.

5. Right-click the new .htaccess file and select View/Edit.

6. When the text editor opens, add the desired PHP version code (You can find the code here). In this example we are using PHP version 7.4. Then save the file from your text editor.

7. Your FTP program will automatically prompt you to confirm saving. Click Yes.

8. Done! This directory will now always run with PHP version 7.4.

Diese Support-Artikel könnten Ihnen auch gefallen…

Restore a backup

Restore a backup

If your website suddenly stops working due to incorrect manipulation or a failed update, or you want to go back to an...

read more