cloudwafercloudwafer
  • Home
  • Knowledge Base
  • Products
    • Web Hosting
    • Dedicated Server
    • Domain
    • Cloud DNS
  • faqs
  • Client Area
  • Get Support
  • Home
  • Knowledge Base
  • Products
    • Web Hosting
    • Dedicated Server
    • Domain
    • Cloud DNS
  • faqs
  • Client Area
  • Get Support
home/Knowledge Base/cPanel - Control Panel/How to Set the PHP Version per Directory in cPanel

How to Set the PHP Version per Directory in cPanel

26 views 0 February 11, 2017 Updated on November 4, 2022 cloudhelp

Do you want to use different PHP versions per directory? You can do this using cPanel and the dot htaccess file.

1. Log in to your cPanel account.

2. In the Software section, click on MultiPHP Manager.

3. The first thing we need to do is to get the code generated by cPanel.

4. Scroll down to the bottom of the page. Select your domain from the left side of the screen. You can view the PHP Version from the drop-down menu on the right. Please, select the appropriate PHP version from it and click on Apply.

5. First, open the /public_html/.htaccess file in the cPanel File Manager, and you will find the code generated by cPanel.

6. After you copy the code, should you wish to set the PHP to version 8 in the directory forums, create a .htaccess file in the directory /forums/ and paste the code generated in the previous step.

7. Congratulations, now your directory forums is using PHP 8. Should you wish to set any other directory to use the same version of PHP as well, you would only need to copy the code from the .htaccess file and paste it into that directory.

Now, reset your PHP version from your primary domain. Should you wish to use a different PHP version on any directory, follow steps five and six, generate the code, copy that code from /public_html/.htaccess and paste it into the directory where you want to set the selected PHP version.

Was this helpful?

Yes  No
Related Articles
  • How to create sub-domain via cpanel
  • How to create NodeJS Application in cPanel
  • How to Access cPanel Web Disk
  • How to Create an Additional Web Disk Account in cPanel
  • How to Edit or Remove a Record in cPanel
  • How to Edit or Remove а CNAME Record in cPanel

Didn't find your answer? Contact Us

Leave A Comment Cancel reply

Popular Articles
  • How to make payment
  • How to Install Dotclear via Softaculous in SiteWorx
  • How to Remove a Post in WordPress
  • How to Change the VNC Password in SolusVM
  • How to Edit an Account Level/Global Email Filter in cPanel
KB Category
  • Billing
  • Databases (da
  • General (Plesk
  • Softaculous (SiteWorx
  • Domain Management (Plesk
  • Backup/Restore (Plesk
  • Mail Filters & SPAM (DA
  • FileZilla FTP Client
  • others(cpanel
  • SSL
  • Backup/Restore
  • Wordpress
  • DNS – Nameservers
  • Cloudwafer Manager – Hosting
  • SolusVM Basic
  • Security (SiteWorx
  • CloudLinux (DirectAdmin
  • Domain Management
  • cPanel – Control Panel
  • Domain Management (DA
  • WHM
  • Forum(cpanel
  • Forum (SiteWorx
  • Blog (SiteWorx
  • Others (SiteWorx
  • Backup/Restore – SiteWorx
  • Virtualizor Basic
  • SolusVM VPS Management
  • CloudLinux (Plesk
  • Mozilla Thunderbird
  • Domain Management – SiteWorx
  • SiteWorx Basic
  • FTP (Plesk
  • Email (Plesk
  • Backup/Restore (DA
  • Email (DA
  • Email (SiteWorx
  • Virtualizor VPS Management
  • FTP (DA
  • CloudLinux (cPanel
  • DirectAdmin
  • PayPal
  • WHM (For Resellers
  • CMS/Portal (SiteWorx
  • Databases (Plesk
  • Post Features
  • FTP (SiteWorx
  • Databases
  • Installing a Control Panel
  • Android
  • Blog (cPanel
  • CMS/Portal
  • iOS/Apple
  • Outlook 2019
  • Cloudflare (cPanel
  • WHM (Root
  • FTP (cPanel
  • Security (cPanel
  • Softaculous
  • Mail Filters & SPAM – cPanel
  • Email (cPanel

  How to Set the PHP Version per Domain in cPanel

How to Add “A Record” in cPanel  

Company
  • About us
  • Client Area
Hosting Products
  • Web hosting
  • Dedicated Server
SUPPORT
  • Knowledge Base
  • Faqs
SOCIAL
  • Facebook
  • Twitter
  • Privacy Policy
  • Terms of Use
  • © 2022 CloudWafer. All rights reserved.