Hello,

I am considering moving from Drupal 4.7.6 to Drupal 5.2. I have a couple of things to confirm before I start:

1) I should upgrade to 4.7.7 before I go to 5.2, right?

2) Do themes from 4.7x work with 5.2? I use the slash theme and have modified it for google adsense. Will it work without changing anything in 5.x?

3) When going from 4.x to 5.x should I uninstall all modules before I do the upgrade?

Thanks.

Comments

cog.rusty’s picture

1) I should upgrade to 4.7.7 before I go to 5.2, right?

Not necessarily. 4.7.6 and 4.7.7 are both minor releases of the same 4.7 version branch, and they are both pretty recent. If you want to, it should take only a few minutes to set your site to off-line, upload the new code, and run update.php. All your modules and themes will still work.

Now... going to Drupal 5 is a large step.

2) Do themes from 4.7x work with 5.2? I use the slash theme and have modified it for google adsense. Will it work without changing anything in 5.x?

No, it won't work. No Drupal 4.7 module or theme works in Drupal 5. You have to find corresponding modules and themes for Drupal 5, or modify them, or live without them. Take a look here:

Converting 4.7.x themes to 5.x
http://drupal.org/node/64292

3) When going from 4.x to 5.x should I uninstall all modules before I do the upgrade?

Before you begin, check the modules and make a sanity check. For example, if a big part of your content is in flexinode content types (which does not have a Drupal 5 version) you might want to reconsider or postpone.

Then you should:
- Take a database backup.
- Set your site to off-line (under /admin/settings)
- Disable all your non-core modules, disable clean-urls, switch to one of the core themes.
- Remove (or just move) the Drupal 4.7 files and all modules and themes, but keep your own files, and take note of your settings and any changes you have made in sites/default/settings.php and .htaccess.
- Upload the Drupal 5 files and update your settings in sites/default/settings.php (or any other changes).
- Run update.php -- Core Drupal has been updated.
- Upload the new versions of modules and themes into sites/all/modules and sites/all/themes.
- Enable them and run update.php again. If you see any error messages, print them out.

This is a major upgrade. If you have many modules installed there is a significant probability that something (hopefully small) will go wrong, for some simple reason which was not foreseen. So, I would do this in a testing subdomain first, after uploading the initial database dump into a new database and adjusting settings.php, to know what to expect.

nancydru’s picture

I have a potential client who wants a significant site upgraded from 4.6. I'm guessing that I need to go to 4.7 first to pick up form APIs, etc.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

cog.rusty’s picture

Hi Nancy.

Yes, I am afraid so. There was this alarming post by goba:

http://hojtsy.hu/node/8 (I can't say I understand everything there)

and also this explanation by dww:

http://lists.drupal.org/pipermail/development/2007-July/025542.html

The short story is that sometimes some functions used for prior updates have been deprecated and removed from the newer Drupal version which perform the upgrade, in which case special measures are taken, but these special measures are not designed or tested for upgrades from much older versions.

So it is generally not safe to skip major versions, and specifically wrong to skip 4.7. So, the ritual has to be done twice. This alone is not terribly hard, but I would worry how well module upgrades would handle it. So, a test upgrade seems important.

I would set up a 4.7 subdomain and a 5 subdomain with all the modules I could find already in place, and I would throw the database dump at them in turn, and watch where and how it breaks when enabling/updating modules. I would also take a new backup after a successful step.

------ Edited to add:

In that same mailing list thread, however, there was one report from kbahey that a direct update did work.

http://lists.drupal.org/pipermail/development/2007-July/025525.html

So, this could be something worth trying in your test upgrade.

pgrote’s picture

Thanks, Rusty. It sounds like more work than I want to do right now. What's the plan with 4.7x? How long will it be around?

Thanks again for the response!

cog.rusty’s picture

Officially, 4.7 will be abandoned in 2-3 months, with the release of Drupal 6. Only one previous version at a time is supported with bug fixes, security updates etc.

Just as it happens now with 4.6, several people will continue to run it and to discuss issues here, but after 6 more months most of us regulars will have forgotten what it was like.

"The drop is always moving."
http://drupal.org/node/65922

pgrote’s picture

Super. So in 2-3 months I'll be back crying in the middle of the upgrade. :-)

Thanks, again!