I have a question. I hope it's not too dumb. I am really new to version control. I just decided to start learning git because I am doing bigger and bigger projects that would benefit from version control. I have a question though.
Let's say I have a branch called becky.myssite.com that is my development area. I install a module to play around with it. I go into drupal and play with the settings and stuff. Or, let's say I make a block and put it on a page to see if i like it before it goes to the production site.
All that information is really being held in the database right? So if I push from my becky.mysite.com branch to my production site, how is this copying the database info over? Or is it not doing that?
I am really confused about this. Please let me know. I would really love some advice.
Becky
Comments
I believe ...
Settings, such as block visibility, are stored in the database as you note, while code is easily handled via version control. What you'd like is to somehow migrate settings via version control.
You could do a mysqldump of your Drupal DB and check that into version control, and then migrate it to your production system for the sake of populating your production database with the results from mysqldump. I believe some people do that.
You might also be able to use the "features" module to group certain functionality settings together and migrate them, although I have only read a little about that.
Others can offer more detailed advice but hopefully this is a starting point for you
Dave
Well, the thing is, I have a
Well, the thing is, I have a beta site for one of my large site, where i try out new things before I do them on the production site. I thought the point of version control was so that I could do all that and then move it over easily to the production site. I'm not necessarily making code changes, sometimes I'm just playing with settings, and I don't want to have to do them over and over on the beta and the production site.
Thanks for your tips though. I'm going to try them out.
Hi Becky! The problem you're
Hi Becky!
The problem you're describing is still one of the biggest unresolved problems in Drupal as far as I can tell. The features module comes close, and people are looking at tackling the issue in D8. Version control is more about facilitating teams of developers to be able to work on a project together moreso than as a deployment tool.
Ok. Thanks, that clears my
Ok. Thanks, that clears my thinking up quite a bit. Are there other deployment tools I could use?
I haven't started using it
I haven't started using it quite yet, but with drush make you can get your whole site set up with a single command using a .make file. Seems pretty neat!
See: how drush make just changed my life
Maybe i misunderstand your
Maybe i misunderstand your question, but I would look at features, strongarm and panels modules.
And instead of creating a block in the Drupal UI, i always create blocks in a custom module, and place it on a certain spot with panels.
All panels info can be exported to a feature module, and then you have it all in code instead of in db, and you can easy deploy between environment.
Usable ?
Those are really good
Those are really good suggestions. I'm going to look into all these modules. Currently, my site is not using panels. Is it a lot of work to convert a site to panels?
Thank you for the suggestions!
Becky