Create sub-domain in CPanel via UAPI from WordPress
Earlier this year i enquired on this forum about achieving what the thread title explains. I've since realised i need better hosting or so i think. I'm just about to ditch my current host and finda good budget VPS preferably managed as im not a Linux Guru. Can anyone explain what Features i need in respect to the question asked here, namely what versions of CPanel API and do i need CPanel and whm API? I know the new UAPI is recommended but I've since heard that you can perform sub-domain creation from external scripts like PHP without cpanel/whm 'root' access. The following answer snippet quoted from Stack Overflow :
If this is indeed the case then this would solve a lot of headaches since most 'managed' VPS packages that provide root access are out of my budget range.
Any help, very much appreciated.
-
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 -
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 -
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 -
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 -
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 -
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 Bye0
Please sign in to leave a comment.
Comments
6 comments