Login to WHM
Search for ‘Change Hostname’ in the left menu pane and click on it.
You can see your current hostname as shown below.
Type your new hostname in the box under ‘Change Hostname’
This is how we can change the server hostname from WHM.