13 Mar2016
How to change the hostname on a cPanel server via the command line (SSH)
It is easy to change the hostname on a cPanel server via the WHM interface. If you prefer to do things via SSH, this is how you do it.
The hostname on a cPanel server needs to be updated in a several places. To avoid any issues with MySQL PID files etc, cPanel has made it easy with a quick script that will change make the change quickly and effortlessly.
As root, run the following command:
/usr/local/cpanel/bin/set_hostname yournewhostname