|Drupal - Is migration the right word?|
Moving from localhost to server.
| 4:18 pm on Mar 7, 2013 (gmt 0)|
I've been experimenting with Drupal on my computer (xampp/localhost). I'm to the point where I want to start testing things out on my actual server.
I see the word MIGRATION used in the Drupal documentation. What I don't understand is if this type of transfer just involves my WEBSITE DATA or if the Drupal Core and Modules (and their configuration) are included with this transfer too.
Possible I just need to have the Drupal Core installed on the server (the location I am moving TO) and everything else (including Module installation and configuration) just takes care of itself?
I don't need specific instructions, just a general idea of what takes place. Thanks.
| 6:32 pm on Mar 7, 2013 (gmt 0)|
Migration usually refers to migrating data from a legacy system (custom, some other CMS, old version of Drupal) to your new system. So for example, I'm "migrating" data right now between an old drupal install and a new one on my local dev station.
All you need to do is
- copy all the files to your server, core and modules. Make a tarball of your entire Drupal install (or use git and push to github then go to your server and pull from github, that will work too).
- run cron and clear all caches
- dump your DB to a file
- upload the file to the DB on the server
- adjust file system settings (see Status Report)
You should be good to go.
| 8:18 pm on Mar 7, 2013 (gmt 0)|
Durpal/core/configuration are transferred as a unit (.tar file).
Separately, website/database info is transferred like through a backup/restore utility (module).
So, once I have existing Drupal installs at both local and server locations, which is the plan over the long term? -
1) I always needed to mirror future activities with both Drupal installations (like with future additions of modules).
2) The .tar installation and data installations are completely separate and I can always just update the Drupal configuration with a new .tar upload?
| 10:49 pm on Mar 7, 2013 (gmt 0)|
Whew! Honestly, I think you might invest in Angie Byron's Using Drupal book from O'Reilly or check out some of the courses at Drupalize.me
I know it sounds like a simple question, but in the Drupal world the answer is often "it depends".
For code, possible methods include
- FTP what's changed
- push from your dev platform to a git repo and then pull to live
- run drush up on both platforms if just updating a module
- perhaps others
For data/configuration, that's not simple. Ideally you want to do as little of that as possible on the dev platform. When you make config changes, you need to make a note of them and then manually apply on live.
There are some other options
- create a "deploy" script as you go that will set variables using drush
- save config options as "features" (requires the Features module and the Strongarm module)
- use the Deploy module and similar, none of which I've had great luck with.
Improving this is a big initiative for Drupal 8, known as CMI (Configuration Management Initiative). See [groups.drupal.org...]