Really old drupal site needs upgrade

billl4 - October 15, 2009 - 19:12

Hello,

I inherited a really old Drupal site (4.2) that is in desperate need of upgrade. I gather that I need to upgrade to 4.7 then to 5.x then 6.x.

1. Can I go from 4.2 straight to 4.7? If so, where can I download 4.7? If not, where can I download the intermediate versions? My search on this site did not lead me to any download pages for any versions of 4.x

2. If the 4.x versions of Drupal are no longer available, what are my options for upgrading my site to 6.x?

I realize that 4.x is no longer supported, but I just wanted to know if anyone out there had similar problems and came across any solutions.

The host is upgrading the site's shared server (PHP4.4.7 to PHP5.11, MYSQL 4.1.22 to MySQL 5.081 and Apache 1.3.37 to Apache 2.2.13) and I'm not sure how it might affect this old version of Drupal

Thanks in advance for any advice.

Drupal project page

ishmaelsanchez - October 16, 2009 - 01:59

http://ftp.drupal.org/files/projects/drupal-4.7.11.tar.gz you can get 4.7 and http://drupal.org/node/3060/release for all core releases. I don't know about Drupal 4.x sites but I would jump from 4.2 to 4.7 to 5 to 6. Make backups and read all the documentation about upgrading.

good luck

Thanks for the links

billl4 - October 16, 2009 - 02:40

Thanks for the links Ishmael. Hopefully the jump from 4.2 to 4.7 won't be too rough. The non-core modules ought to be fun ;o)) Looks like a long weekend ahead.

4.2?!

Michelle - October 16, 2009 - 02:47

Yikes, that's old!

There was a change in the way the version numbers are handled with D5. Before that, there were three numbers used. So you're more major versions behind than you realize. What you need is:

4.2 -> 4.3 -> 4.4 -> 4.5 -> 4.6 -> 4.7 -> 5 -> 6

You might need to go from the first to last minor version in each of those as well; I'm not sure on that.

With something that old, you might be better off just building a new site and porting the content via SQL.

Michelle

---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)

You're right

billl4 - October 16, 2009 - 04:37

Now that I see the files, there are 41 versions between 4.2.0 and 4.7.11. If I try this, does anyone know if it is it ok to go from 4.3.0 to 4.4.0 or do I have to go to 4.3.0 -> 4.3.1 -> 4.3.2 -> 4.4.0? 4.6 has 12 versions (4.6.0 -> 4.6.11)!!

=-=

VeryMisunderstood - October 16, 2009 - 04:51

at a minimum you should upgrade to the latest release of each version.

I would disable and remove all contrib modules from 4.2 before hand.

Personally, I agree with Michelle, I think your best bet is to install Drupal 6 and work some SQL magic to get the content and users and such moved over after the fact which will leave you with a database as clean as possible. Especially considering that some of the folder stucture has changed along the way as well as moving to a settings.php file from what it was back in the day.

You are very likely in for some huge headaches trying to get from one version to the other in a way that won't break anything at all. Ensure you test the site throughly after each upgrade in case something does break you know with which upgrade it broke.

Be religious with your backups along the way, regardless of what path you choose.

SQL newbie = no magic

billl4 - October 16, 2009 - 17:00

I'm a SQL newbie, so I doubt I could perform any magic unless I had really specific instructions. Although, I agree that trying to go through all the upgrades is going to be a major hassle and extremely time consuming. I'll see if I can find someone who can help out with SQL. If anyone knows about any sites/links that might describe what I need to do, please let me know.

I appreciate all the helpful comments so far.

.

Michelle - October 16, 2009 - 04:53

You can jump minor versions. You can go straight from 4.6.0 to 4.6.11 because each minor version contains all the upgrade code from the prior ones. Now that I think about it more, I'm pretty sure you can jump right to the highest minor version in each major version. So you'd take your 4.2 site and upgrade to the last in 4.2.?? and then upgrade that right to 4.2.?? where ?? is the last minor version in the 4.2 branch.

Michelle

---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)

Similar problem. - SQL magic?

hquadrat - October 21, 2009 - 21:32

My problem is very similar to billl4's - just that I don't have a 4.x but a 5.7 installation of drupal running (with many modules and a complex structure built with OG* and TAC*). I tried and tried to update my installation to the current 6x-version of drupal but i get just too many errors when trying to update - no matter in what order I update (core / optional modules, small or large steps in minor versions). Of course I have read all those standard update instructions, so I am sure I did it in the right way and backing up even every step. No way to update without errors (many of them!) it seems - and my knowledge of MySQL / SQL is just too basic to find the causes for all those errors.

@Michelle: you spoke of exporting/importing contents via SQL, which is actually what I am looking for - but I dont know HOW...? Is there a more or less suitable/simple way of doing this? Unfortunately I did not find anything yet... so any help with this is very much appreciated!

My goal would be: Setting up a fresh Drupal 6.x installation (current version) and importing only the most important contents from my 5.x installation (Blogposts, Pages, Books and their corresponding comments if possible). All the rest (users, modules, etc.) isn't that much important to me as I would need to redesign my page completely when upgrading to drupal 6. Maybe I even will not need TAC or OG anymore at all.

OG = organic groups
TAC = Taxonomy Access Control

Thanks...
hQuadrat

Try this

ishmaelsanchez - October 21, 2009 - 21:50

I have never used this but it might help you, http://drupal.org/project/node_import. Otherwise you might have to write a custom import script.

Import / export

Michelle - October 22, 2009 - 13:54

There's an import / export API module, node import, user import, and also using views to export. Nothing really solid and easy to use, though.

What I'm doing in my 5 ->6 rebuild / upgrade is to build the D6 version seperately while the D5 version is live. Then I merge them together by upgrading the D5 site to D6 then clobbering the non-content parts by exporting everything I can (views, page variants, etc) from the D6 version and just copying whole tables where it makes sense. To me, this is easier than trying to export the content and import it into the D6 shell.

Michelle

---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)

I may have to try something else as well.

billl4 - October 24, 2009 - 07:00

I may have to try something else as well. I've gotten from 4.2 up to 4.6 with just some minor error/warnings. But every time I go up to 4.7.0 all hell breaks loose. I get lots of errors like this:

# user warning: Unknown column 'pid' in 'field list' query: SELECT COUNT(pid) FROM url_alias in /home/xx/public_html/includes/database.mysql.inc on line 120.

warning: getimagesize() [function.getimagesize]: PNG file corrupted by ASCII conversion in /home/xx/public_html/includes/theme.inc on line 519.

# warning: Cannot modify header information - headers already sent by (output started at /home/xx/public_html/includes/database.mysql.inc:120) in /home/xx/public_html/includes/common.inc on line 139.

user warning: Unknown column 'theme' in 'where clause' query: SELECT * FROM blocks WHERE theme = 'bluemarine' AND status = 1 ORDER BY region, weight, module in /home/xx/public_html/includes/database.mysql.inc on line 120.

I have literally dozens of the Unknown column 'pid' error.

I delete the 4.6.0 drupal files and replace them with the 4.7.0 files from (http://ftp.drupal.org/files/projects/drupal-4.7.0.tar.gz). I then update the sites/default/settings.php. I have no contributed modules or themes. Just the core ones that came with the 4.6.0 upgrade. I run update.php and then the errors start flowing.

When I run update.php, it updates really fast and it does not give me any errors.

Drupal database update

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

* main page
* administration pages

There is nothing below. No errors, nor any updates. I'm wondering if it really updated anything. The 4.7.0 update is supposed to list everything that was updated like the previous updates, correct?

Do you know what might cause an update (update.php,v 1.186 2006/04/20) to not run any updates?

Missed a step

Michelle - October 24, 2009 - 12:37

If you go from 4.6.0 to 4.7.0, you're missing all the upgrades between 4.6.0 and 4.6.11. 4.6.11 will contain all the upgrades since 4.6.0 so you can jump right to that and then to 4.7.0.

http://drupal.org/node/106957 <-- 4.6.11

Michelle

---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)

Made it to 6.14

billl4 - October 26, 2009 - 00:55

Well, I made it to 6.14.

4.2.0 -> 4.3.0 -> 4.4.0 -> 4.5.0 -> 4.5.8 -> 4.6.0 -> 4.6.11 -> 4.7.0 -> 4.7.11 -> 5.0 -> 5.20 -> 6.0 -> 6.14

I wouldn't wish this on anybody! What a pain in the ...

Thanks to all of you for your suggestions.

Anyway, I haven't fully tested everything, but the content looks like it is basically there. I got rid of all the old non-core modules and themes after 4.3. So, I have to get a new theme (for some reason deanocrats isn't available any more ;o)) and work on integrating new modules.

One thing I noticed so far is that the html comments tag <!-- comment --> shows up with the comments in my blocks. I imagine this has something to do with the filters in 6.x. Since I only have the core modules loaded, I'm not sure how to fix this. I don't want to hack the core, so is there another module that will correct this?

Thanks again.

figured out the comment tag

billl4 - October 26, 2009 - 01:14

I figured out how to stop the html comments from appearing. I just unchecked the "Html Corrector" in "Input formats".

Congrats!

Michelle - October 26, 2009 - 01:23

That's quite a feat. Make sure you fully back up now. :)

Michelle

---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)

for sure

billl4 - October 26, 2009 - 06:33

I'm actually surprised I was able to pull it off.

I have backed it up 21 times now. Every step of the way. And good thing too. I had to go back to previous revisions several times during this process. I also noticed that a couple of my uncompressed .sql backups from phpmyadmin were corrupted for some reason. Luckily, I made a gzip copy as well, and I was able to restore the db from that copy.

Thank goodness for BigDump too. It makes it much easier to restore a 145MB db file.

 
 

Drupal is a registered trademark of Dries Buytaert.