Introduction
cPanel doesn't have an automated procedure to move emails from one domain to another domain. But, you can utilize modifyacct to change a domain name, which includes updating the email accounts to the new domain name.
The modifyacct function provides the following informational message when selecting the "Primary Domain" field.
Procedure
Note: Ensure you have a backup available if you want to revert to the state before a change is made. If you're going to make a new backup the below command will suffice. Replace cPanelusername with your account username.
/scripts/pkgacct cPanelusername
- Login to WHM
- Navigate to Modify an Account
- Select the account or domain name you want to change
- Update the "Primary Domain" field to your new domain
Note: This function will not work if the domain is an existing domain already on the server. You must first remove the existing domain name.