The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can site creation be completely automated?

Discussion in 'Database Discussions' started by firewoodtim, Sep 7, 2008.

  1. firewoodtim

    firewoodtim Registered

    Joined:
    Sep 7, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am considering leasing a managed server from a provider that uses WHM/cPanel in their managed server package. I have been a reseller for my current host and am versed in the manual method of creating a site using the forms in WHM.

    However, I would like to take the site-creation process a step further. WHM has an API that includes a number of functions. Is it possible to use those functions (or custom scripts) to automate the site-creation process as follows:
    (1) gather information from a visitor using forms at my hosting site,
    (2) use that input to create the user's site,
    (3) install a configured MySQL db,
    (4) install a standard set of custom php scripts on the site (e.g. a CMS),
    (5) set a random password, and
    (6) post an email to the customer with all the information necessary for login?

    In other words, I want to sell websites containing an installed CMS completely automatically, with no human intervention beyond the customer's input.

    Is this possible, and, if so, how do I go about learning how to do it?
     
  2. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    yes it's all possible. I would do it by putting your base scripts in the /root/cpanel3-skel directory. when whm creates a new account, the data you put in that directory gets replicated into the new account's dir structures.
     
  3. trochia

    trochia Member

    Joined:
    Aug 26, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Have a sample script for doing the database inserts?

    Thx...Jim
     
  4. firewoodtim

    firewoodtim Registered

    Joined:
    Sep 7, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Right, that's a problem. I've got an "install.php" script that would be included in the directory of scripts to be installed, but that has to be automatically runs as part of the setup.
     
Loading...

Share This Page