Notes:
- This tutorial is valid for Namecheap Shared Hosting with Apache web server type.
- During the video, we share the following code that should be added to the '.htaccess' file content:
<FilesMatch ".(?:html|php)$">
SetHandler application/x-httpd-alt-phpXX
</FilesMatch>
The XX in the code is the PHP version you wish to set. It can be any of these: 52, 53, 54, 55, 56, 70, 71,72, 73, 74, 80, or 81.
- When a different PHP version is set for an addon domain, there are no PHP extensions enabled by default. You can run this command via SSH to ensure your website work correctly:
cp /opt/alt/default_php_ini/phpXX.ini /home/cPanel_username/path_to_the_folder/php.ini
- XX is the PHP version you wish to set (it can be 52, 53, 54, 55, 56, 70, 71, 72, 73, 74, 80, or 81);
- cPanel_username should be replaced with your actual cPanel username;
- path_to_the_folder is a path to the folder of the addon domain.
Find more Namecheap Knowledgebase How-To videos on
YouTube. Do not forget to subscribe to our channel!