ASU Web Community

How I Created a Drupal PRD/DEV Environment

eftucker's picture
in

In creating a Drupal CMS system. I really needed to utilize the PRD-QA-DEV process. I had to move 3 things. Content, Modules, and then Themes. How?

1. Requested a DEV site from UTO Webhosting. Once completed, I did a basic Drupal install on the site.

2. Installed the Backup_Migrate module http://drupal.org/project/backup_migrate onto both sites.

3. Used a FTP program(I used FETCH on a Mac) to sync to my created "sites/all" module and theme folder.

4. To move content: I use my PROD Backup_Migrate module to copy all of my content onto my local drive, then I upload the file using the Backup_Migrate module into my DEV site.

That's it!

You have have any question, please leave a comment.

Thursday, May 22nd, 2008 - 4:18 pm
  • jjrosent

Somewhat similarly.

We run an alternate install of drupal on our same domain for qa/dev. I like my dev/qa environment to be an exact copy of my prod environment and I wanted it to refresh itself weekly. I went with a bash script and cron job like so:

#delete dev contents and copy prod contents there
rm -rf /home/YOURUSERNAME/public_html/YOURDEVDRUPALFOLDER
cp -R /home/YOURUSERNAME/public_html/YOURPRODDRUPALFOLDER/ /home/YOURUSERNAME/public_html/YOURDEVDRUPALFOLDER

#delete the dev settings file and set the correct dev db in the new one
#my bash foo was weak and it wasnt writing to the existing file but was writing fine if the file was gone...
rm -rf /home/YOURUSERNAME/public_html/YOURDEVDRUPALFOLDER/sites/default/settings.php
sed -e "s/@localhost\/YOURPRODDBNAME/@localhost\/YOURDEVDBNAME/" /home/YOURUSERNAME/public_html/YOURPRODDRUPALFOLDER/sites/default/settings.php > /home/YOURUSERNAME/public_html/YOURDEVDRUPALFOLDER/sites/default/settings.php

#copy the prod database to dev
mysqldump -u YOURUSER --password='YOURPASS' YOURPRODDBNAME | mysql -u YOURUSER --password='YOURPASS' YOURDEVDBNAME


#todo email results