Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

.htaccess file edit for subdomains

Discussion in 'General Discussion' started by gusgikas, Apr 21, 2019.

  1. gusgikas

    gusgikas Registered

    Joined:
    Apr 21, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    Hi Everyone,

    I'm really hoping someone can HELP me out.

    I currently have multiple hosting accounts running cPanel and PHP Version 7.2

    These sites are currently running WordPress 5.1.1.

    I'm having an issue installing from applications from Installatron, which require a PHP 5.6. I have created subdomains, but to no avail will these applications install.

    I was told I can create a custom .htaccess file in the subdirectory of the subdomain, to force it to only use PHP 5.6; but I'm not sure if that would work.

    Your guidance and assistance is greatly appreciated.

    Looking forward to your response.

    Thank you...
     
  2. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,909
    Likes Received:
    127
    Trophy Points:
    368
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Add to your .htaccess

    <IfModule mime_module>
    AddType application/x-httpd-ea-php56 .php .php5 .phtml
    </IfModule>
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,466
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    You could also just go to cPanel>>Software>>MultiPHP manager and set the subdomain to whatever PHP version you'd like it to run as well. This automatically restarts/rebuilds any necessary configurations and is the most correct way to achieve this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice