Question
How to Manage PHP versions on the command line?
Answer
MultiPHP can be managed via the command line by leveraging whmapi1, via the PHP Module. Below are examples of the most common commands:
Get the available PHP versions
# whmapi1 php_get_installed_versions
Set the system default PHP version for the server
php_set_system_default_version
# whmapi1 php_set_system_default_version version=ea-php70
Set the PHP version for a domain
Note: Make sure to change example.tld with your actual domain name!
# whmapi1 php_set_vhost_versions vhost-0=example.tld version=ea-php74
Get the PHP version for all domains
# whmapi1 php_get_vhost_versions
Comments
0 comments
Article is closed for comments.