Knowledgebase Categories Backup/Restore 4 Broadband Internet 1 cPanel - Control Panel 24 Databases 11 Dedicated Servers 3 DNS - Nameserver 6 Domain 2 Domain Management 10 Domain Transfer 1 Email 13 FTP 4 Installing a Control Panel 6 Mail Filters & SPAM 8 Mobile 11 New Microwave Upgrade 1 Others 3 Security 10 Softaculous 71 Web Hosting 1 Wordpress 17 Categories Backup/Restore (4) Broadband Internet (1) cPanel - Control Panel (24) Databases (11) Dedicated Servers (3) DNS - Nameserver (6) Domain (2) Domain Management (10) Domain Transfer (1) Email (13) FTP (4) Installing a Control Panel (6) Mail Filters & SPAM (8) Mobile (11) New Microwave Upgrade (1) Others (3) Security (10) Softaculous (71) Web Hosting (1) Wordpress (17) How to Set the PHP Version per Folder? Do you have a single domain or wish to use different PHP version per folder? Do you have an installed PHP 5.x software in a folder/blog and want to use a PHP 7.x instead? If so, you can do this using cPanel and the .htaccess file.1. Log into your cPanel account.2. In the "Software" section, click on the "MultiPHP Manager" icon.3. Assume that we are new to this and the first thing we will need to do is to get the code generated by cPanel.4. Scroll down to the end of page, select your domain from the left side and you will see the option "PHP Version" with a drop-down list on the right side. Select the appropriate PHP version from the drop-down menu and click the Apply button.5. Now open the /public_html/.htaccess file in the cPanel File Manager or in your FTP client and you will find the code generated by cPanel. 6. After you copy the code, you will wish to set the PHP version to version 7 in the folder/forum, which means you will need to create a .htaccess file in the folder /forum/ and paste the code which was generated in the previous step in it.7. Congratulations, now your folder/forum uses PHP 7, and if you wish to set any other folder to use the same version of PHP as well, you will only need to copy the code from the .htaccess file and paste it into that folder. Reset your PHP version from your main domain. If you wish to use a different PHP version on any folder, you will need to follow steps 5 and 6, generate the code, copy that code from /public_html/.htaccess and paste it into any folder where you wish to set your selected PHP version. Was this answer helpful? Yes No Print this Article Also Read How to Change cPanel Style/Theme? Switching over to another cPanel theme with a different style is easy and there are two ways to... How to add a MX Record in cPanel using DNS Zone Editor? A mail exchanger record (MX record) is a type of resource record in the Domain Name System that... How to create Cronjob via cPanel? 1. Log into your cPanel account.2. In the "Advanced" section, click on "Cron Jobs" Icon. 3.... How to add CNAME Record in cPanel using the DNS Zone Editor? CNAME records are referred to as alias records since they map an alias to its canonical name. You... How to upload files via the cPanel FileManager? If you don't want to use a 3rd party FTP Software, you can use the cPanel's inbuilt... Powered by WHMCompleteSolution Support My Support Tickets Announcements Knowledgebase Downloads Network Status Open Ticket