I am currently working on a quite a big project for a client and one of the things that they want is to be able to create new isntances of their software on different sub domains and each using its own database, they want to be able to do this in the most automated way possible. A quick overview of the way a new isntace created is:
- A new sub domain is created by one of their administrators by going into thier 123-reg control panel
- A new database is created by one of their administrators by going into their 123-reg control panel
- They login to an centeral admin panel and fill in a form which then copies over a zip file of the software to the new sub domain and unzips it.
- The script then edits the database connection class with the database infromation supplied in the form.
- The script then checks the connection and creates the tables
- Finally the admin database is updated with the instances new information.
The problem I am having is moving files around different sub domains. For instance the admin panel is at admin.website.com
and as an example a new instance might be located at instance.website.com
no matter what I try I cannot get a file to move to a different sub domain... Does anyone have a solutions to this? For anyone wondering the directory structure is like so:
- /public_html/admin/
- /public_html/instance/
- /public_html/instance_2/
etc.