Create a Staging Site for Drupal - Existing Domain


#1

What would be the best way to setup a staging site for an existing NON drupal site on DH, where I can install Drupal, build the Drupal site, and then when ready, “migrate” it in the easiest fashion to the existing live DH hosted www.domain.com?

Has anyone done this here? I am familiar with the usage of dreamhosters.com subdomains… How would I accomplish this using them in the easiest fashion with a DB driven site like Drupal?

Thanks


#2

It’s be easiest to install it as a subdomain of your domain, so beta.example.com.

When you’re ready to go live:

  1. If you want to maintain its One-Click status so you can do One-Click upgrades, back up your main site and then delete it from the panel. And then create your domain using the Mirror option so it points to your subdomain.

  2. If you want the cleanest setup and can live without the One-Click upgrades, FTP to your server and use the rename function on the directories holding your sites: Rename example.com to example.old | Rename beta.example.com to example.com | Rename example.old to beta.example.old (just to keep it alive). And then go into your sites and clean up any improper URL references.


#3

Thanks.
I wont be using the One-Click since we want to install a custom theme etc…
So, from your helpful suggestion I think I would…
1- Create the subdomain of my live site - drupal.livesite.com
2- Install Drupal there
3- Build and Test
4- When ready to push it live:
5-Make a file backup of live site anyhow
6-Delete the Hosting account www.livesite.com in the panel? (might need some explanation here…)
7-use the mirror function to present www.drupal.livesite.com when www.livesite.com is requested?
Leave that Subdomain in place always, huh?

Thanks a lot for the help.


#4

Since it’s not One-Click, go with #2, which involves the directory rename. Don’t do #6 or #7

So:
Do 1–5.
6- FTP to your server and do the renames: example.com -> example.old, drupal.example.com -> example.com
7- Edit your Drupal site so it uses the new URL (example.com instead of drupal.example.com). This may be in a config file, or through the admin panel in Drupal.


#5

Thanks Much appreciated!
Have a great Weekend,


#6

hey there. i had almost the exact same question. prior to reading this thread, i had been thinking of:

Want to migrate http://foo.com from another hosting provider. Prior to flipping dns:

  1. Setup a mirrored site: http://foo.dreamhosters.com
  2. Setup a new mirrored mysql database: http://mysql.foo.dreamhosters.com
  3. Install Drupal (custom, not 1-click) in this mirrored environment - referencing the mysql.foo.dreamhosters.com - during installation.
  4. Build out the site, test and gain approval.
  5. Flip dns from old host provider to this new site.

So, I’ve never done anything like this before, and I’m a little uncertain about:

  1. Whether this is viable
  2. What happens/what to expect after the dns flip. (e.g. Will there be housekeeping req’d?)
  3. Per step 3 above, when installing drupal it asks you to point it to the mysql instance it will use, writing this reference into the data. When this gets repointed to the proper mysql instance, what happens to these references?

Wondering how you (James) made out with the suggested approach. And/or if anyone wants to weigh in on this (different) approach.
Thanks a lot to any and all for any info.
Cheers,
Purchy.


#7

Hi there. Regarding the Database, actually you dont have to change anything. If the mirror on DH is set to mirror the actual hostname to the subdomain. then the domainname will resolve to the files in the subdomain where you did all the staging work, and hence the database connection, but appear to be at www.domain.com

I didnt intend to have a different database for my staging site vs. my live site.

I would like to go in and do the correct housekeeping to be able to have the DRUPAL site/files under the Fully Qualified Domain name and not the subdomain any longer but I’m not sure what that entails to be honest. Scott said that you can:
“7- Edit your Drupal site so it uses the new URL (example.com instead of drupal.example.com). This may be in a config file, or through the admin panel in Drupal.”

But I do believe you can run it on the dreamhosters.com Subdomain being mirrored from the true domain indefinately.
Lets talk more as I would like some added info on this myself.
So far my project worked out fine as I described above. When I flipped the DNS the DRUPAL site at subdomain.dreamhosters.com (mirror of actual domain) shows!


#8

i am very new to drupal and feel like i am slogging through mud.

reading the post by sdayman, i get the sense that i will need to
install drupal for each website that i create on DH? currently, i
have multiple domains and if all goes well with my initial foray
into drupal, i will be using it for other domains on DH.

thanks for any help!


#9

This sounds like you want to run Drupal in Multisite mode. Here’s a little information on it:

Maybe I like doing extra work, so I’ve avoided multi-site installations. Individual setups let me customize each one the way I want.


#10

that’s a good tip! thanks for your quick reply.