0

I'm trying to get more rigorous about my process for deploying Drupal sites across development and production servers. In particular, I'm experimenting with pulling the site from my SVN repository into a directory on the server and flipping a symlink to point the server to the updated site. This makes sense to me, but I'm not sure how to handle the sites/default/files folder -- it's not in the repository created by the development process since those files are produced by the production users, and the directories inside this folder have different permissions than the default 0755 that I'm getting from doing the export.

So, what to do here? My current guess is that sites/default/files should be physically moved out of the site directory and then symlinked back in, but wanted to check with others with more experience in this. A related question is whether there are other files or directories in a Drupal installation that would need to have their permissions updated after an svn-based installation like this. sites/default/settings.php comes to mind, for instance. Anyway, is there any advice out there? Thanks!

2
  • Do you mean you're keeping your content on the live server, and pulling it down to dev and test? If so, you can use the Stage File Proxy module. It will transfer the content, or you can hotlink (301) to the live server so you only have to keep content in one place. Jan 21 '14 at 21:02
  • I think I want to stay with the repository approach, but thanks for the pointer!
    – Jim Miller
    Jan 21 '14 at 21:20
2

Ahh the age old question of how to properly deploy Drupal from dev->test->live. If you search around you will find many opinions and answers. There is no one answer and no singular method. The symlink solution is good one and is safe and simple. Another solution would be to use SVN to sync directly back to the same site/directory(s). You could mark certain files so that they are not pushed. If a mistake is made, you just revert. One other file I can think of that you may not want to overwrite is .htaccess. Other than that, settings.php and your files directory are about all that would need to be excluded.

1
  • Thanks -- I've been experimenting with a combination of what you describe, and it seems to be working. The symlinking of the site root and sites/default/files seems to work nicely; I haven't run into any permissions problems so far...
    – Jim Miller
    Jan 21 '14 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.