How to change master domain for an account on cPanel server from command line

To change the master domain for an account on a cPanel server from the command line, you can use the cPanel API WHMAPI1. Here are the steps:

– Connect to the server via SSH using your preferred terminal emulator.
– Use the following command to change the master domain for the account:

whmapi1 modifyacct user=USERNAME newdomain=newdomain.com

Replace “USERNAME” with the username of the account that you want to modify, and replace “newdomain.com” with the new master domain that you want to set.

Wait for the command to complete, and verify that the master domain has been changed by logging into cPanel as the account owner and checking the “Domains” section.

That’s it! You have successfully changed the master domain for the account using the command line on a cPanel server.

Source: https://api.docs.cpanel.net/whm/introduction/

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *