Create multiple copies of a cms on demand

hpan33

Registered
Jul 24, 2013
2
0
1
cPanel Access Level
Website Owner
Hi, I am a website developer for a small company which has both a website owner cpanel account and a reseller account (the host is a friend of ours, so we have some perks :) )

I have created a website cms that I want to duplicate it, so that my clients would see a personalized demo. Normally I would create my own control panel to do the following:

- Create the user and the database
- Copy the cms contents (files, assets) into a new folder
- Copy the database contents from the original database
- Change the variables to reflect to the new site.

The problem with cpanel is that I am restricted to create my database and user manually. Is there a way to integrate all of the above into a cpanel module for a specific user use as an automation procedure?

I have also seen the xmlapi.php from github, but I get access denied as a result.

Can someone give me something to begin, some tips or even some code (concerning the interfacing of cpanel) would be welcomed. I know both php and perl, but I would be interested to achieve this in php.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

You could create a custom cPAddon using the instructions at:

Introduction to cPAddons

The cPAddons system allows a script to be packaged up so that it can be installed on a user's website, upgraded, uninstalled and otherwise managed from cPanel and Web Host Manager.

Thank you.
 

hpan33

Registered
Jul 24, 2013
2
0
1
cPanel Access Level
Website Owner
Hi :),

thanks for your reply, but it is too technical to be used by my staff members :(.
The concept is that a user of my staff would do something like a fantastico install or softaculous install. Using a small control panel, either inside cpanel or in a subdomain of my normal site, it would setup the home directory with the initial site content for rapid development.

What kind of solutions are there for this? I mostly want to manipulate the database part (create a database assign the database to a user that you create), everything else is solved.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
The instructions in my previous post would not be required for all users. You would create the cPAddon, and then after it's installed it's available for installation under the "Site Software" option in cPanel for all users to install with a few clicks.

Thank you.