Stagging domain for a live site hosted by dreamhos

wordpress

#1

I have a live site already hosted by Dreamhost; I want to develop a new site using Expression Engine on a stagging site.

www.existingsite.com

stagging.existing.com

When we are ready to go live; I want to point the real top level domain to stagging.existing.com.

I know how to set up a subdomain for the existing site – but how do I then make it the top level domain when the time comes?

Does that make sense?

Do I need to set up the subdomain differently? Or it is all dns magic? Or is it just a .htaccess issue?


#2

To some degree, it depends on how comfortable you are with the technical aspects involved. There are “simplish” ways to do this stuff, but you have to understand what is happening, both with the hosting “setup” and with the internals of Expression Engine.

I’m not really familiar with Expression engine (I’ve installed it a few times, a couple of years ago but that’s about it), so I may not be completely “on the money” here, but as I am doing this myself all the time with other applications, I have a couple of tips.

Assuming that you actually want www.existingsite.com to show the contents of staging.existing.com when the development work is complete, there are a couple of ways to go, and which way you do it depends upon your expertise in the shell and editing files as well as how expression engine handles its paths and URLs internally.

  1. You could use the control panel to “reassign” the “base” directory of www.existing.com (which is usually in the form of /home/.dataglob/yourusername/[www.]existingsite.com/) to the directory used for staging.existingsite.com (in the above example, probably something like /home/.dataglob/yourusername/staging.existingsite.com/

  2. If you no longer will have a need for the contents of existingsite.com, you can also just delete it ,or rename it to something else *maybe a good idea in case something goes wrong), and then rename the directory staging.existingsite.com to existingsite.com (with or without the www depending upon what the control panel shows is the “base” of existingsite.com).

Either way, you may (probably) have to make some minor directory path or url related changes in the expression engine setup to reflect the new location/address of the expression engine application. As I said, I do not use expression engine, but normally these types of applications store such information in either a config file or a database field accessible from their admin section (or both!).

No “DNS magic” is involved and, while you *might could kludge something together with .htaccess redirects, etc. it would not be a good solution as it would place unnecessary load on the server and your urls would not accurately reflect the “site” in relation to the files’ paths. Also, depending upon how expression engine handles it’s urls (maybe rewriting to provide SEF/SEO optimized or “pretty” urls), you attempts to accomplish your goal with .htaccess redirects may severely compromise or very much complicate the operation of expression engine’s re-write scheme.

All this assumes you will not need to change the database or host involved (ir Expression Engine even uses one!), otherwise, additional steps (to ensure that the database and host are still accessible with the new domain structure) are likely to be needed.

–rlparker


#3

Hi Tim,

RLP has covered most of the salient points of your issue, but I’d like to suggest that the one thing you may need to look into further yourself is the step of “moving” your staging site to the real site. Beyond the mechanics of getting DreamHost to serve up the new site instead of the old site (which RLP has covered nicely), there is the issue he mentions of reconfiguring Expression Engine to know its serving up existing.com instead of how you originally configured it - staging.existing.com.

This is a question to look up in the Expression Engine knowledge base or forums. I did a couple of searches but didn’t come up with anything. Since WordPress has a well-documented process for doing this, I’d guess that Expression Engine does as well - you just have to be better than me at searching (or at least more persistent).

Good luck and if you have time, report back on your findings or progress!

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options