You can change the PHP version for different sites, domains, or subdomains in two ways:
- Using the PHP Version Manager Tool:
- Log in to control panel and select “Manage Hosting.”
- Open the “Tools” drop-down menu and choose “PHP Version Manager.”
- Find the website or domain you wish to update and select the PHP version from the list of available versions.
- Click “Update” to apply your changes.
- Modifying the .htaccess File for Subdirectories/Subdomains:
- Navigate to the specific directory where you want to change the PHP version.
- Edit or create a .htaccess file in that directory.
- Add one of the following lines to set your desired PHP version:
AddHandler x-httpd-php83 .phpfor PHP 8.3AddHandler x-httpd-php74 .phpfor PHP 7.4AddHandler x-httpd-php56 .phpfor PHP 5.6
These methods allow different PHP versions for various websites within the same package.