How/where to switch multisite dev domains to the final domain?

Events happening in the community are now at Drupal community events on www.drupal.org.
quantos's picture

Hi guys. I'm quite new to Drupal multisites and have what I hope is a simple query, I just don't know the answer. ;-)

How/where do you switch your multisite development subdomain, for example, devsite.quantos.co.uk to its full actual domain name, for example www.quantos.co.uk?

I've been successfully following the advise found on various sites, such as this one: http://groups.drupal.org/node/121989 but everything I've read so far only talks about theoretical development URLs and not what happens when you're re-developing a site and you're ready to switch over.

I.E. The development subdomain path (and all asset files) are hardcoded into the Drupal path structure at at our example:

/sites/devsite.quantos.co.uk/files

So is it normal practice to simply point the existing domain there when ready? Or it advisable to rename the system file path (and related items) instead?

Any quick advise from you seasoned multisiters would be appreciated.

PS Any London and/or South Coast, UK freelancers that specialise in Drupal system development including multisite work are welcome to contact me direct. We specialise in front-end Drupal design, development and consultancy so we're always looking for good, reciprocal development teams/freelancers.

Thanks

Comments

I.E. The development

Garrett Albright's picture

I.E. The development subdomain path (and all asset files) are hardcoded into the Drupal path structure at at our example:

/sites/devsite.quantos.co.uk/files

Are these paths in content or in code?

If the former, creating a symlink on your server that points from the old directory name to the new one should do the trick. It's a little messy, but not terrible. Alternatively, if you're not afraid of coding, you could whip up a quick module which provides an input filter which basically finds instances of the old directory name in your content and replaces it with the new name.

If the latter, then you should alter your code to use programmatic methods to get the current file directory instead of a hard-coded one. This might be as easy as just using the "public://" stream-wrapper; eg, "public://document.pdf" instead of "/sites/devsite.quantos.co.uk/files/document.pdf". If you want to learn more about stream wrappers, you can start here - a bit tricky to wrap your head around if you're used to doing things the norma way, but actually quite easy to use in practice.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: