Best practice for moving between dev/staging/production

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

I have a question about the best way to move OS instances between dev, staging, and production servers? I'm running into occasional problems where I'll find myself being directed to old URL/domain names, and am trying to understand what I should be doing differently.

The story so far:

I initially built out OS on my local laptop, using a name like http://foo/ As I got farther into the project, I bundled up the files and db and transferred them to our dev server, and the domain became something like http://bar-dev.example.org/ However, as I continued to work on that dev server I'd occasionally find myself sent back to http://foo/

Now that the project has launched (by copying the fileset and db up to the production servers), and is running on its final URLs (http://openscholar.example.org/ for the base OS and http://dept.example.org/ for the department site), I'm still finding myself sent back to the previous URLs at times.

Is there a better way to move between environments like this? I've done things this way with vanilla Drupal sites with no problem, but I'm seeing a number of tables in OS that retain hardcoded URLs - specifically purl, variables, and spaces_overrides but I haven't finished going through all the tables by hand.

Comments

When moving between

rbrandon's picture

When moving between environments you will need change the value of "purl_base_domain" to match the current environment. Setting this in your settings.php file along with the changed db connection parameters is a good way to go.

As far as custom domains within the install "http://dept.example.com", when we copy to staging or dev we automatically run the drush command "drush vrd" for "vsite-remove-domain. With no arguments this will remove all custom domains, you can optionally specify a custom domain to remove.

Hope this helps.

Richard

OpenScholar

Group organizers

Group notifications

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