After changing web host server hostname by using WHM (WebHost Manager) or via shell command, cPanel may display “Invalid License File” error message.
The symptom appears immediately on next navigation, and even after
administrator or cPanel user logout and login again to WHM/cPanel.
The
error occurs because changing hostname will invalidate the cPanel
license.
The solution to invalid cPanel license is easy. Simply login to the
server via SSH as root (or su to root), and run the following command:
/usr/local/cpanel/cpkeyclt
The command will reset and refresh update the cPanel license file
with the new current hostname,
and push the change to cPanel’s license verification servers auth.cpanel.net and verify.cpanel.net.