Posted by vIQleS on January 11, 2011 at 9:51pm
Sorry if this is a silly question - I've just started using Drupal last year and this is my first major upgrade.
I've got all my sites in one multi-site setup.
A couple of them are very simple, and basically good to go.
Can I upgrade just one of two of them at a time?
e.g. Could I create a new dir for drupal 7 and copy the sites over into it one at a time? (To eventually migrate all of them as the modules I need become available?)
FYI:
http://lx1.co.nz
http://nzmagic.co.nz
vs
Comments
Sure. Why not? Managing the
Sure. Why not? Managing the web server configuration gets a little trickier when you're dealing with two Drupal "cores" instead of one - you'll have some of your domains drawing from your D6 installation directory, and some drawing from the D7 one - but it's certainly possible.
Are there specific problems you're foreseeing happening?
The Boise Drupal Guy!
Just set it up yesterday
I just changed my setup yesterday. I am using CentOS 5 with PHP 5.2.17 and MySQL 5.1.xx.
Anyway, In my /var/www/html directory I have a drupal directory for drupal 6 and a drupal7 directory for drupal 7.
I almost always set up my installs as a multisite just in case I want to add a sub-domain.
I have 3 domains on the d6 install and I have setup a sub-domain for the d7 install mostly for testing right now.
Using the vhost file I just point the domains to the proper directory and set up an A record in DNS
If you are using cpanel or some other managed hosting you could just add a subdomain and point it to the proper directory.
Here is a basic setting on the vhost file:
NameVirtualHost 192.168.1.100:80
<VirtualHost example.com:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html/drupal
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
</VirtualHost>
<VirtualHost example.com:80>
ServerAdmin admin@example.com
ServerName d7.example.com
ServerAlias www.d7.example.com
DocumentRoot /var/www/html/drupal7/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
</VirtualHost>
I'm basically a noob.
I guess I'm just not clear on how the upgrading works - I've read through some instructions, but they seem to be assuming one site.
How does the upgrading work if I'm doing a multisite, and how would I do one at a time. (Is it too much to ask for a step by step? :-D)
Idea:
I've already got a D7 dir, (and set up a test site)
The instructions I've read said something about deleting the D6 install and copying the new files over...
So - can I just change where an existing domain is pointing and then set it up using the same db details and expect it to work (after adding the apropriate modules etc)? Or do I need to copy some stuff?
Did that even make any sense?
"Using the vhost file I just point the domains to the proper directory and set up an A record in DNS
If you are using cpanel or some other managed hosting you could just add a subdomain and point it to the proper directory."
Yeah - I didn't understand most of that... I have no idea what a vhost file is.
I use cpanel (or the dreamhost equivilent thereof) but isn't adding a subdomain the exact opposite of what I want? I want the actual site to point to the new d7 no?
(I've already got test.lx1.co.nz pointing at D7...)
vIQleS, the process would go
vIQleS, the process would go something like this:
Back up your database.
Ensure that all the modules you are using for your Drupal 6 site have Drupal 7 equivalents available, and that all of those modules have a clear upgrade path (and/or you don't mind reinstalling and recofiguring the ones that don't). Likewise with themes.
Disable all non-core modules on the D6 version of the site. Back up the database again (don't overwrite your first backup!).
Create a new D7 subsite using the database credentials of the D6 version of the site. Go through the core upgrade process.
Gradually download, install, re-enable and upgrade all of the contributed modules and themes. Note that you'll have to do this in reverse order of dependency (if module A depends on module B, you'll have to reinstall module B before module A). Periodically make more database backups.
It can be a lot of work, especially if you have a lot of modules installed, and there's no guarantee that things will succeed, particularly when it comes to the upgrade path of contrib modules - hence why I recommend often making database dumps during the process; if you need to back up and undo a step, or possibly the entire upgrade process, it will be easy to do so.
Good luck! Let us know how it goes.
The Boise Drupal Guy!
Ok - I've thought of a
Ok - I've thought of a potential problem...
So far I've been setting my sites up to all use the same database. Is that going to be a problem in this case? (With database updating and whatnot)
(Is it even a good idea in general? So far I've pretty much been mucking around - I'm thinking that for any new stuff, or if I start doing sites for other people, I'd be better off setting up seperate DBs. True or false?)
So the same DB, but different
So the same DB, but different table prefixes?
I don't anticipate a problem; the updating process will respect the prefixes and won't touch any database tables it shouldn't. I personally think having separate databases for your sites is a good idea, as it makes dumps easier to do and reduces the damage if you fat-finger a dump of all your tables or something, but it's up to you.
The Boise Drupal Guy!
Finished
Ok - so I just finished the second site and it seems to be working fine.
So for anyone else that has the same setup as me, here's how I did it.
I already had a /drupal7 dir and a site running on it. (test.site.co.nz). All my other sites are in /drupal6. And the two that I'm upgrading are both using a single database (with prefixes). (They're sharing with two of my other sites which I'm not upgrading yet.)
I've also got upgrade assist installed which helped a lot at the beginning.
I recomend you read upgrade.txt and http://drupal.org/documentation/upgrade/6/7. I printed them out and read them through twice each.
Once you've determined that the site can be upgraded, and all the modules, core and theme are up-to-date:
While I was waiting for the first one, I tried to check my test site and it went to the install screen, so I copied sites/default to sites/test.site.co.nz. This now loads and runs fine.
I used dreamhost's webftp for the ftp bits - it's actually faster and less hassle than filezilla (but mainly because I was at work and it's the only way I can acess my ftp)
When I completed the upgrade, I had a failure of some sort on captcha. I uninstalled it (modules/uninstall) and then reenabled it; I put the recaptcha key back in and checked the settings and it seems to work fine now.
If anyone wants to copy this for any wikis / instructions etc, help youself. Feel free to clean it up / fix URLs etc. (Credit would be nice...)
Wow.. You bypassed the 'make
Wow.. You bypassed the 'make a local copy with MAMP, upgrade there, see if it works, upgrade for-realsies' loop of the process?
You're made of sterner stuff than I. :-)
Oh yeah - you should prolly
Oh yeah - you should prolly do a test upgrade first... :-D
To be fair tho - I'd already tested the install with a dummy site. Both sites are non-crucial with not much data, and easily rebuilt, and I did have backups of the databases if anything went wrong...
ETA: Actually, one of the advantages of doing it this way is that if it failed, all I had to do is point it back at drupal6 and restore the db and (theoretically) I should have been good to go...