Where cpanel stores the list of domains/subdomins/add-on domains?

Augusto Will

Active Member
Sep 9, 2011
43
6
58
cPanel Access Level
Root Administrator
I need to create a script to rebuid some configurations of clients.
Where is the better file to read to get user webroot, username and domains/subdomains, add-on domains etc.?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

You will likely want to utilize some of the information stored in the account's userdata directory:

Code:
/var/cpanel/userdata/$username/main
/var/cpanel/userdata/$username/$domain
Thank you.