Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Postwwwacct Help

Discussion in 'cPanel Developers' started by Fitzuk86, Sep 20, 2012.

  1. Fitzuk86

    Fitzuk86 Registered

    Sep 20, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi Guys,

    First Post here as I have desperately tried to resolve this without having to waste your time to assist me :-/

    Basically I have created a postwwwacct script for the purpose of cloning a "Joomla" site to a fresh domain & database each time a new account is created in WHM.

    So firstly zipped up a working Joomla public_html directory and unzipped it to the skeleton directory.

    So on account creation it currently copy's the joomla files to the new account then runs the post script which creates a database, db user (using the same password as the cpanel account), gives the user full privileges and adds the user to the db.

    This all works great.

    I then had some problems getting it to import a *.sql dump of the site in to the database which it now successfully does.

    Finally in order for this to work I need to modify the "configuration.php" file that is copied from the skeleton directory to the newly created account directory, replacing various references to database info, tmp paths and logs with that of my newly created account and database info.

    All I need is a method of swapping out the following information included inside the ** with the newly created account and database information:

    var $user = '*CpanelUsername*_user';
    var $password = '*CpanelPassword*';
    var $db = '*CpanelUsername*_site';
    var $log_path = '/home/*CpanelUsername*/public_html/logs';
    var $tmp_path = '/home/*CpanelUsername*/public_html/tmp';

    My end goal is that running an account setup gives me a fully installed and working "preconfigured" Joomla site.

    If anybody could advise me on this I would be very greatful.

    Thank you in advance for any time taken reviewing this for me.

    [See Attached for my latest copy of my postwwwacct script]


    Mark Fitzpatrick

    Attached Files:


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice