This article aims to outline the process of whitelisting a country in cPhulk from the command line.
To update the cphulk country whitelist, you would use the following WHMAPI1 function:
whmapi1 set_cphulk_config_key key=country_whitelist value=$COUNTRY_CODES
Here is an example of how you may use this function to whitelist the US in cPhulk:
whmapi1 set_cphulk_config_key key=country_whitelist value=US
There are a few notes about this function that you should be aware of.
- This value overwrites the current whitelist.
- Enter a comma-separated list to enter more than one value.
- For a list of countries, run the WHM API 1 function
Here are the accepted values you can input for the whitelist:
- A comma-separated list of valid ISO 3166-1 alpha-2 country codes.
- An empty string.
More on this WHM API function can be found here: