Hi

I'am using heart internet to host our Drupal based websites and wish to build and maintain a test version of each site we build for clients.

I thought the best option would be to have a subdomain for each client from our main site (e.g. http://theircompanyname.ourcompany.com). When i try this however (via the control panel) i just get a folder within my main site (i cannot install drupal within my existing drupal site).

Can anyone please advise me on how they build and manage test sites on their host providers.

Many thanks

Comments

Road Runner’s picture

If your production drupal site is in the public_html folder then I put test version of drupal site in a folder called testfolder (or whatever you want to name it) inside the public_html. Move another drupal install into the testfolder and access via productionsite.com/testfolder

The first time you do that the install.php will be invoked so make sure you have database set up and so on.

mrmagica’s picture

This was easier than i thought - you really helped me.

I created a sub domain and then installed drupal inside a new folder in my public_html folder and all worked a treat.

Moving to live was easy - created a new site then uploaded all content from test (images, themes etc). Then used backup migrate module to move database - and i got a duplicate site.

tchurch’s picture

If I understand correctly, this then means you have multiple installations of the Drupal core system on the same domain which could be a waste of space and a nightmare to update.

Another way would be to handle the subdomains within Drupal itself so that you only have 1 core installation.

I've done this on my site for exact the same reason as you (client development/testing/playing).

example (using ourcompany.com):

under the sites folder create a sub-folder called "client1.ourcompany.com".
Under this you could have folders for files, modules, themes, libraries etc... for things that are only for that sub-domain.
Note - I place all my modules under sites/all/modules so that I only have 1 copy to update, unless I'm editing a module specifically for client.
You also need the settings.php file in this folder (I copied the default one).
Edit the settings.php file so that:
- all references to ourcompany.com are changed to client1.ourcompany.com
- If you want to use separate tables for this sub-domain then this can also be changed here (you could use a shared users table but maybe you don't need that).

Then go to http://client1.ourcompany.com/install.php and it should create all the new tables and things.