
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
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.
7. Done! This directory will now always run with PHP version 7.4.
Via FTP
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.
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.