How to add domain as parked/alias using cPanel API whmapi1 one line command?

You can add a domain as a parked/alias using the cPanel API whmapi1 in a single command line using the following syntax:

whmapi1 --output=json --user=USERNAME Park::addparkeddomain domain=DOMAINNAME

Replace USERNAME with your cPanel username and DOMAINNAME with the domain name you want to park/alias.… Read the rest

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
Read the rest