Using Different PHP Versions for Subfolders or Subdomains in cPanel Month Read Expired: 3 Minute cPanel has a large user base as a web hosting management panel and allows users to manage websites. However, despite such widespread use of CPANEL, the need to use different versions of PHP for subfolders or subdomains is often a problem encountered.a large user base as a web hosting management panel and allows users to manage websites. However, despite such widespread use of CPANEL, the need to use different versions of PHP for subfolders or subdomains is often a problem encountered. There are some methods offered by cPanel to meet this need. When you want to use a different version of PHP in a specific part of a website or subdomain, .you can perform this operation by using the htaccess file. I will explain this process step by step belowWhen you want to use a different version of PHP in a specific part of a website or subdomain, .you can perform this operation by using the hen you want to use a different version of PHP in a specific part of a website or subdomain, .you can perform this operation by using the htaccess file. I will explain this process step by step below: Identify the Relevant Subfolder or Subdomain: First, identify the subfolder or subdomain for which you want to use a different PHP version. For example, "deneme.com if you have a "master domain name" and want to use PHP 7.3 in the "/expert host/" subfolder, specify this subfolder as the target. .edit the htaccess File: " Located in the root directory of the corresponding subfolder or subdomain.edit the "htaccess" file or create it if it does not exist. Specify the PHP version by adding the following code to this fileedit the htaccess File: " Located in the .edit the htaccess File: " Located in the root directory of the corresponding subfolder or subdomain.edit the "htaccess" file or create it if it does not exist. Specify the PHP version by adding the following code to this file: AddType application/x-httpd-ea-php73 .php .php7 .phtml AddType application/x-httpd-ea-php73 .php .php7 .phtml Save and Check the Changes: .save the htaccess file and provide access to the subfolder or subdomain to make sure that your web server correctly accepts these changes. Then, by viewing a PHP information page (for example, "info.Save and Check the Changes: .save the htaccess file and provide access to the subfolder or subdomain to make sure that your web server correctly accepts these changes. Then, by viewing a PHP information page (for example, "info.check which version of PHP is being used (by creating a file named "php").By following these steps, you can successfully configure different PHP versions for subfolders or subdomains in CPANEL. In this way, you can meet different PHP requirements in different parts or subdomains of your website and get a more flexible structure.y following these steps, you can successfully configure different PHP versions for subfolders or subdomains in CPANEL. In this way, you can meet different PHP requirements in different parts or subdomains of your website and get a more Did you find it useful? Thank you for your feedback. Sorry about that :( We'll work to make it better. You voted before. (40 times viewed / 0 people found it helpful)