UAPI DomainInfo does not show result


May 11, 2019
cPanel Access Level
DataCenter Provider
Hi Team,

not sure if anybody had ask this kind of question before. What i'm trying to do is to automatically install wordpress whenever cpanel user add an addon domain to their account. the script that i use is just a bash script which trying to get all the required information for the wordpress installation using wpcli. I have attached the script to Whostmgr::Domain::park hook.

so far i manage to get and prepare some part of the information required. However, i'm not able to get information like document root and also ip address assigned to the addon domain. i have try to run few command options which i believe should be able to give me the information that i need during the hook run. However, the result shows that the information is not being generated during the hook run. Below are some command that i used.

uapi --user=<cpanelusername> DomainInfo single_domain_data domain=<newly addon domain>
whmapi1 domainuserdata domain=<newly addon domain>
cpapi2 --user=<cpanelusername> AddonDomain listaddondomains regex=<newly addon domain>

most of this command will give below output.

userdata: {}

command: domainuserdata
reason: Obtained userdata.
result: 1
version: 1

the userdata always shows nothing.

However, when i run the command manually after the hook run completely. i can see that all of the commands that i used does return the correct output with the information that i need to use.

is there anyway or steps that i need to follow to make sure i get the required info during the hook run?

looking forward for the best way to solved this.



Product Owner
Staff member
Nov 14, 2017
Hi @senyapsudah

Have you looked at enabling WHM>>Server Configuration>>Tweak Settings ->
Standardized Hooks - Debug Mode
The Standardized Hooks System’s debug mode helps to troubleshoot hook issues.

To see if it clues you into any potential errors?