• Home
  • Store
    • Browse All
    • DirectAdmin Hosting Panel
    • Plesk Hosting Panel
    • Budget Hosting
    • US East Performance KVM/VPS
    • US West Performance KVM/VPS
    • Pocket Stacks
    • Budget VPS Plans
    • Reseller Hosting
    • Storage KVM
    • Premium VPS
    • Register a New Domain
    • Transfer Domains to Us
  • Announcements
  • Knowledgebase
  • Network Status
  • Affiliates
  • Contact Us
  • More
  • Account
    • Login
    • Register
    • Forgot Password?
    1. Portal Home
    2. Knowledgebase
    3. cPanel - Control Panel
    4. How to Set the PHP Version per Folder?

      Categories

    4
    Backup/Restore
    16
    cPanel - Control Panel
    11
    Databases
    6
    DNS - Nameserver
    10
    Domain Management
    6
    Email
    11
    Email
    4
    FTP
    1
    Installing a Control Panel
    8
    Mail Filters & SPAM
    11
    Mobile
    3
    Others
    10
    Security
    60
    SiteWorx (Control Panel)
    60
    Softaculous
    19
    SolusVM
    2
    Using cPanel
    11
    Wordpress

      Categories

      Support

      My Support Tickets   Announcements   Knowledgebase   Downloads   Network Status   Open Ticket

    How to Set the PHP Version per Folder? Print

    • 0

    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?

    Related Articles

    How to update your cPanel Contact Information or receive a notification on reaching quota limit? If you want to receive notification on reaching your disk quota, bandwidth usage limit, reaching... 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 Edit file in the cPanel File Manager? 1. Log into your cPanel account.2. In the "Files" section, click on "File Manger" Icon. 3.... How to Change Language of your cPanel? cPanel supports a lot of languages, and if you want to change your cPanel language to your native... How to Reset my cPanel Account Password? If you can access your cPanel account, follow these steps to reset your password:1. Log into your...
    « Back

      Support

      My Support Tickets   Announcements   Knowledgebase   Downloads   Network Status   Open Ticket

    Need help? Support 24 / 7

    Web Hosting

    VPS

    Dedicated Server


    Loading...
    Loading...
    Choose language
    العربية
    Azerbaijani
    Català
    中文
    Hrvatski
    Čeština
    Dansk
    Nederlands
    English
    Estonian
    Persian
    Français
    Deutsch
    עברית
    Magyar
    Italiano
    Macedonian
    Norwegian
    Português
    Português
    Română
    Русский
    Español
    Svenska
    Türkçe
    Українська

    Generate Password

    Please enter a number between 8 and 64 for the password length