Optional new directadmin.conf option, by default disabled, set to: set_php_bin_path_in_shell=0 If you set it to 1: set_php_bin_path_in_shell=1 Then anytime the php version is changed, DirectAdmin will try and set the PATH to contain that given /usr/local/php72/bin path. There are restrictions allowing the feature to be enabled, but prevent DA from changing things. The files that DirectAdmin will use are: CentOS: ~/.bash_profile Debian: ~/.bash_profile FreeBSD: ~/.profile =============== Once enabled, when making a php version change, DA will check: - If the profile does not exist, DA will add the default: PATH=/usr/local/php72/bin:$PATH export PATH - If it does exist, DA will go through each line, if PATH is found, it's replaced with the new value, and the export line is assumed to already be set. =============== Rules for new value: If there is an existing PATH set in the profile, if the first value is not /usr/local/phpXX/bin, then DA will not touch it. This is assumed to be a custom entry, and how Users can have it left alone. If the existing PATH does start with /usr/local/phpXX/bin, then the XX values are updated to the new version, accordingly and all other variables should remain untouched. UPDATE: The rule for profiles now also considers the default values of: PATH=$PATH:$HOME/.local/bin:$HOME/bin PATH=$PATH:$HOME/bin If either of these are present, DirectAdmin will insert the /usr/local/phpXX/bin path in front of them.