Skip to main content

Create sub-domain in CPanel via UAPI from WordPress

Comments

6 comments

  • cPanelKenneth
    Hi c3PanoH, You should be able to automate subdomain creation with a cPanel account. A limitation is the subdomains can only be created on the cPanel account. Account Sally cannot create subdomains on account Fred, for example. If you need to create subdomains on other accounts, or the server hostname, then you'll likely need a VPS as those abilities are not available to a cPanel account. If a cPanel account works, then you'll need: a cPanel account with access to the Subdomains feature. That feature gives you access to the SubDomain::addsubdomain API call (UAPI Functions - SubDomain::addsubdomain - Developer Documentation - cPanel Documentation). The cPanel UI uses the same API calls that your script would use.
    0
  • c3PanoH
    Hi c3PanoH, You should be able to automate subdomain creation with a cPanel account. A limitation is the subdomains can only be created on the cPanel account. Account Sally cannot create subdomains on account Fred, for example. If you need to create subdomains on other accounts, or the server hostname, then you'll likely need a VPS as those abilities are not available to a cPanel account. If a cPanel account works, then you'll need: a cPanel account with access to the Subdomains feature. That feature gives you access to the SubDomain::addsubdomain API call (
    0
  • cPanelLauren
    I am sorry about the delay in this.
    Just curious : many web hosts allow you to create more than one website and have multiple domain names on the same hosting account so, to use your example, if account-Sally and account-Fred both belonged to me under my cPanel account could i then create sub-domains on Fred from account-Sally?

    So lets say that you don't have account-Sally and account-Fred since if they existed on your cPanel account they wouldn't be separate accounts. Let's say instead you have added Sally.tld and Fred.tld as addon domains. Once that's complete yes you could most certainly create subdomains for them.
    0
  • c3PanoH
    I am sorry about the delay in this. So lets say that you don't have account-Sally and account-Fred since if they existed on your cPanel account they wouldn't be separate accounts. Let's say instead you have added Sally.tld and Fred.tld as addon domains. Once that's complete yes you could most certainly create subdomains for them.

    Hello thanks for the response, So in my new hosting plan they describe Hosted Domains as "The Number of domains with their own web sites, email accounts and DNS records that you may host under your cPanel account." - please excuse my ignorance, are they referring then to 'addon-domains'
    0
  • cPanelLauren
    Sort of, Domains can be subdomains, addon domains or alias domains. They're referring to all three I believe. You could argue that alias domains don't technically have their own site but they could have their own email accounts and DNS records.
    0
  • c3PanoH
    Sort of, Domains can be subdomains, addon domains or alias domains. They're referring to all three I believe. You could argue that alias domains don't technically have their own site but they could have their own email accounts and DNS records.

    Ok, got it so more choices then since most hosts provide most of these. Thanks for that Lauren - i'll consider the thread closed now Bye
    0

Please sign in to leave a comment.