- Plesk for Linux
- Main domain
example.comhas PHP version, for example, 7.1.
subdomain.example.comis created via CLI with PHP handler version of, for example, 7.2:
# plesk bin subdomain --create subdomain -webspace-name 'example.com' -domain example.com -php_handler_id plesk-php72-fpm
In Domains > subdomain.example.com > PHP Settings > View the phpinfo() page can be seen that PHP 7.1 is in use.
- FPM configuration file for
subdomain.example.comis located in the pool of PHP 7.1:
# find /opt/plesk/php/ -name "*subdomain.example.com*"
- Sub-domains created via API have the same issue.
Plesk bug PPPM-7753 that is planned to be fixed in one of the future product updates.
Note: The solution is compiled with versions of PHP mentioned in the symptoms in mind.
Until a fix becomes available to use the following instruction:
- Go to Domains > subdomain.example.com > PHP settings
- Select PHP version other than the required one and click Apply
- Select the required PHP version and click Apply
Also, it is possible to switch it back and forth via the command line:
Log in to Plesk using SSH.
Execute the following commands:
# plesk bin domain -u subdomain.example.com -php_handler_id plesk-php71-fpm
# plesk bin domain -u subdomain.example.com -php_handler_id plesk-php72-fpm