Rate this article :
3.7/5 | 3 opinion
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Sommaire
Procédure
You may be using companion domains to host other websites on your cPanel hosting. However, some of the sites you are going to set up will need a PHP version other than the base version in order to function. It will therefore be necessary to be able to modify the PHP version for companion domains via an .htaccess file.
The .htaccess file should be placed in the directory associated with the companion domain you have added.
If you use a popular CMS such as WordPress or Prestashop for example, an .htaccess file is already present in the root folder of your website.
Depending on the version of PHP you want to use on your site, you will need to add the following lines to the .htaccess file:
SetHandler application/x-httpd-alt-phpXX___lsphp
⚠️ Warning: you need to change the value "phpXX" in the example above to the PHP version you want to use (e.g. php56 for PHP version 5.6, php72 for PHP version 7.2, etc.).
You now know how to :
We hope this information will help you optimise your sites hosted on cPanel and take full advantage of the flexibility offered by the different versions of PHP. Thank you for reading and feel free to leave a comment to share your experience or ask any questions 📝. Good luck with your digital projects! 😄👍
Rate this article :
3.7/5 | 3 opinion
This article was useful to you ?
Yes
No
1mn reading
Use PHP Selector to activate PHP extensions on cPanel
1mn reading
How do I change the PHP version of my cPanel hosting?
1mn reading
How do I change max_upload_size and max_execution_time on cPanel?