• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How do I create domains with a php script?

A

allmightyspiff

Guest
Basically what I am trying to do is have a sign up form and once they complete all the steps my script will set them up a domain in plesk.

I would LIKE to use the plesk RPC API for this however I am having trouble finding newbie documentation on this :(

I have been reading this
http://download1.swsoft.com/Plesk/Plesk7.5/Doc/plesk-7.5r-sdk-html/index.html
however I am using plesk 8.0.1, is that information still valid?

However, what I could really use is a simpler guide to get started with because although the information in that guide is very verbose, it would help to have a bit simpler begginer guide right now.

Anyway, if you could point me in the direction of anything that would help me figure out how to work the with plesk 8 API I would be very appreciative because I can't seem to find anything besides that article I lised above :(

Thanks
 
hey there
yes, that information is still valid
check out this section, it is the most important for you

http://download1.swsoft.com/Plesk/Plesk7.5/Doc/plesk-7.5r-sdk-html/docs/cu/win/ch05.html

you can "fill" your php code with the function exec() calling those utilities

something like

exec("/usr/local/psa/bin/domain --create mydomain.com -status true -clogin myclient");

put the other parameters also, so you can create the domain with the options you like.

remember to run also the other utilities to setup hosting, email accounts (if any)...

well, just do some testing and everything should go fine.

see ya

Pedro Padron
 
Thanks for the replys.

Is it ok just chown them to apache so that my script can run them? I was kinda hoping to avoid doing that which is why I wanted to use the plesk's RPC methods. However the documentation of the RPC methods isnt as clear (at least to me) as thier documentation on the shell commands :(
 
Back
Top