I have two Drupal sites to upgrade from Drupal 4.63 to 4.7. I have never upgraded Drupal before and am a little nervous about doing it. Could you answer some questions about upgrading.
1. Do I need to up grade in steps; i.e. from 4.63to version 4.65, then to 4.6x, etc. or can I upgrade directly from 4.63 to 4.7?
2. Could you point me to the instructions from doing this upgrade? (Does one set of upgrade instructions work with upgrades from all the 4.6x versions?
3. After I originally installed 4.63, I added quite a few modules. Do I need to delete all those additional modules, before or after the upgrade?

Thanks

Best Wishes,
Stephen

Comments

Steve Viscido’s picture

Upgrading...

You might want to upgrade to the higher 4.6.x versions just to see how it works.... But I do not think the database changed enough between 4.6.3 and later that you have to. Don't quote me on that though.

When upgrading from 4.6.x to 4.7, you will need to delete all the modules you had before, and get the new versions for 4.7.0. Do not try to use 4.6.x modules with 4.7.0 -- it won't work. Same with themes. Before you do anything though, backup your site. Backup the html directory in which drupal resides, and backup the SQL database, and store a copy of each backup offline (e.g. on your desktop or a USB stick or something).

Once you're backed up, keep a copy of your settings.php file somewhere easily accessible, so you can reference it. Make a list of the modules and themes you have installed, come to the drupal downloads section here, and get copies of the latest version of each (making sure these are 4.7 versions). If there isn't a 4.7 version, try checking the module's "issues" threads and see if maybe that's currently being worked on. If you have critical modules that are NOT ready for 4.7 yet (or perhaps won't be -- sometimes modules get dropped by the developer due to lack of time/interest), then you have to decide: leave it out of your site, or wait to upgrade. Fortunately I did not have this problem.

Once your modules are set ready to be re-uploaded, and your themes -- all for 4.7.0 -- you now are ready. Log into your site as user #1 (your admin login). Make sure you do this before you delete anything, and just leave that browser window static and minimized (or whatever). You will use this account ot do the updating.

At this stage, you want to wipe the drupal directories out of the html folder. Ones you have that are additional (for example, I have an "images" folder that has nothing to do with drupal) can and should be left in. I did this by just opening a copy of 4.7.0 on my desktop, and looking at the folder names, and then in my FTP client, deleting those folders one at a time. Whatever you do, do not just copy 4.7.0 without cleaning out the 4.6.x files.

Then upload drupal. Once you have uploaded it, Drupal should be ready to go and configure. I would go to the browser with the admin login and poke around, make sure it all looks good. Go to the "module" admin page, and enable any of the core modules you want, disable what you don't. Then hit "update" and let it do its thing (follow the on-screen instructions). Your base site with all its content (articles, etc) should be back.

Once you do that then you can upload all your 4.7 themes, and make sure those work. Usually this is pretty straightforward. Then it's time to upload modules. Follow the module upload instructions for that (each one is different). In many cases you can just go to the module page and enable/save, and that's all. You may have to hit "update" again (the link at the top of the page) and try updating the modules individually. I know I had to do that with Organic Groups and Events.

Hope that was everything... trying to remember what I did a couple of weeks ago.

Stephen Winters’s picture

Steve,
Thank you for the very informative response. I appreciate your helpfulness.
Since I'm a little unclear about how many steps it would take to upgrade from my current 4.63 to 4.7, (Should I upgrade to each version that was made, such as; upgrade from 4.63 to 4.65, then to 4.66, etc, before upgrading to 4.7), and and then I wasn't sure what to do with each upgrade step, I thought I'd see if I could bypass the multiple upgrade path. Could I upgrade all in one step?
Being a little uneasy about possibly messing up my live site, I thought that before upgrading, I'd try an experiment, to see if I could go straight from 4.63 to 4.7. I backed up my MySQL database, created a new test database "drupaltest_db" and then uploaded my backup into the new "drupaltest_db" database. I then installed Drupal 4.7 into a test web folder "drupaltest", configured the settings files, and then tried it out. Although I saw that my website was partially up, there were lots of error messages, as shown here: http://www.winterssewing.com/drupaltest . So Now I'm thinking I can't take that short cut and probably will have to upgrade in steps. After seeing what happened to the test website, I'm reluctant to mess up my live website. Maybe I'll do another test before I try upgrading the live site. But, I guess, as long as I have a back up, I can always restore it to what it was.

When I have a little more time, I'll read over your instructions again and have a go at it. I'm wondering if I have to upgrade in steps (4.63, 4.65, etc) before I upgrade to 4.7. Would I upgrade following the same instructions you wrote out for each upgrade? Do your, or anyone else know if I can upgrade straight from 4.63 to 4.7? Who would I ask?

Thanks

Best Wishes,
Stephen
winterssewing.com/drupal

Steve Viscido’s picture

Those errors... seem like they are possibly due to not doing a full update. When you finish installing 4.7 and it is an upgrade (not a fresh install) you need to go to the administer/modules page, and click "update" and follow the instructions. That will update your SQL database to the new format. If you didn't do that, then your new 4.7 scripts are looking for the new format but only getting SQL in the old format, which would be why you see SQL query errors at the top of your site. At least, that would be my guess -- I am far from an expert.

Stephen Winters’s picture

.... I didn't do the full update. I didn't run the Update. You mention about going to the administer/modules page. But that assumes I would be able to log in. What you see here: Test Web Site is all that I was able to see. I was never able to log in. The Test Web Site is Supposed to look like this: Main Web Site. So Logging onto the website first to do the update doesn't seem likely. Whatever I need to do will have to be done from the website Cpanel. I'll have to reread the instructions a lot more closely. Thanks....

Stephen
winterssewing.com/drupal

Stephen Winters’s picture

Steve,
Thanks for you info about the site not being fully updated. At the time you said that, I didn't know what that meant, or what to do about it, but, combined with Charlies link to Introduction to upgradingI was able to figure out what to do. First, in order to find the correct URL of the update.php file, I went to my website control panel, File Manager and went found the update.php file in the root of my Drupal installation (In my case that was "/public_html/drupaltest/update.php", which corresponds to the URL at: http://www.mywebsite.com/drupaltest/update.php") I then used my IE WebBrowser and navigated to "http://www.mywebsite.com/drupaltest/update.php" At this point, the upgrade page apeared and following the onscreen instructions, I was able to update the database. I must say that before I walked through the process, I had no idea of what it meant to "update" the database. It would have been very useful to have some pictures to show what each step looked like. Anyway, I just wanted to let you know that your help encouraged me to finish. Now the test site is up and running. As soon as I get time, I want to upgrade my live site, but I need to read up a little more about upgrading the added modules before I do that.

I also want to say that having that test site to practice on really helped. Not knowing what would happen, I was so afraid of messing up my live website. I really appreciate the advice that I read on this website about having a test site.

Best Wishes,
Stephen
winterssewing.com/drupal

cel4145’s picture

You can upgrade directly from 4.6.3 to 4.7.

For instructions, see Introduction to upgrading

-----
Charlie Lowe | cyberdash
Tips for posting to the Drupal forums

Stephen Winters’s picture

Charlie,
Thank You for giving me the link to the Introduction to upgrading . I took a glance at it, and it seems like it might be what I need. Thanks a lot for showing me the way. I read through it when I get a little more time.

Best Wishes,
Stephen
winterssewing.com/drupal

genemcc’s picture

Take a look at the videocast at http://drupal.org/videocasts/upgrading-to-4.7

It may help.

Stephen Winters’s picture

Gene,
Thanks for the link to the Upgrading Drupal podcast. I need all the help I can get. Thanks again.

Best Wishes
Stephen
winterssewing.com/drupal

joel_guesclin’s picture

If I may say so, this is a case of "more haste, less speed". The Drupal guys have done a really terrific job of improving the upgrade process and automating it as much as possible, but there is no way that you can just take the old database, slap the new code on top of it, and expect it to work. The principal key to getting this right is to be very careful, read the instructions, plan it out, and then follow the instructions to the letter. You also need to check out any contributed modules you use to see if any of them have upgrade implications. And - as you have quite rightly done - TAKE A BACKUP!!

Stephen Winters’s picture

Yes, be careful. But being careful implies doing things with great care, which implies some knowledge of the process..... which is why I'm doing this with a test site first.

The Drupal guys have done a really terrific job of improving the upgrade process and automating it as much as possible, but there is no way that you can just take the old database, slap the new code on top of it, and expect it to work.

Point well taken. However, since I'm new to this, at times it's a real struggle for me to understand what has been written. I had never upgraded a Drupal website before and wasn't knowledgeable about much of any of this. I didn't even know what it meant to update/upgrade the database, or even what it looked like. This is why I'm experimenting on a test website before I try upgrading my live website. This is also why I copied the database info over from my life website, so that I could experience whatever problems with my actual data I'd have with my live site, before attempting the real website upgrade.

Joel, thanks for your input.

Stephen
winterssewing.com/drupal

joel_guesclin’s picture

Your comment about taking a test version of your website and trying it out is absolutely the right approach IMHO. I have been working with Drupal for a couple of years or so, but I still get very nervous about the conversion process because I am a long way from understanding everything - so far I have only upgraded a small test site, not my real live ones with a dozen contributed modules and several thousand nodes!

However, that said I found the upgrade process on my test site remarkably painless thanks to following the instructions very carefully and not trying to do anything intelligent. From the little experience I have had so far, I think that the most awkward part is liable to be with contributed modules. Drupal core seems to work very well, but there is a new part of the upgrade process aimed at allowing certain modules to integrate with it and it's not certain that everybody will have worked out how to fit into that.

Anyway, keep the stories coming, it's a great help to me when I come to do my major upgrades!

Stephen Winters’s picture

I was locked out and couldn't get into my website. But Now I'm back in. I'm putting this here just in case anyone else has this problem.

I was locked out

In the process of setting up a new theme, and doing some other work, I had logged out to check how it would look to visitors, and I had somehow gotten locked out. (I don't remember exactly how it happen) The login wouldn't accept my password, sort of. I had the "Who's Online block engaged, so, before I tried to log in, it said that there was one guest (me). Then after I entered my ID and password, the "Who's Online" block said that there was one use, "Stephen" (me), and, at the same time it also said that there was one guest (me again). The Navigation block did not recognized me, nor (by manually entering http://www.mywebsite.com/?q=admin etc. into the IE address bar) was I able to go to any admin or user page. It said that I'm not allowed, or something like that) So you could say that I was partially logged in (as shown in the "Who's Online" block.

I Tried to Fix the Problem

(I thought)
At the login prompt I entered the info to have it send me another password, several times, but I never received any emails, even after waiting until next morning. Not knowing what else to do, I went into the phpMyAdmin administration section of my website, found the MySQL database for my website, deleted the the only user (me). I then manually entered myself back into the database. When I tried to login again, still didn't work. At a loss of how to log in, and since this was a new website, (and only a test website anyway) with nothing of value on it, I just deleted the MySQL database. I thought that should get rid of any login problems. I created a new MySQL database, connected Drupal to it, and then went to the website again to log in. I still couldn't log it. Hmmm what to do. I just let it set for a day or so.

Finally back inside the Website

Then, a little while ago, I had a thought. I wondered if the login info was long in the Index.php in the root directory. I used FileZilla to look at the files in the root of the website. While I was there, I just decided to delete all 12 of the files (but no folders) from the root. Then I just FTP'd the new files from my computer to the website root.
This time, when I used IE Explorer to navigate to my website, it acted like a fresh install, which is what I wanted. Following the onscreen instructions, I created my first account again and logged into my website. Now it's working fine.

Synopsis

I'm not a programmer, and don't much about the inside workings of Drupal. I'm writing this for other non-programmers. From this experience, it seems to me that that some of the login information is kept in at least one of the files in the root, or one of those files affects the login. I just know that, even though I had deleted all login info from the database, and even deleted and replaced the whole database I wasn't able to return the website back to it's "first User Account" status until I deleted and replaced all the files in the root. If I had of known which file was affecting this, I would have only replaced that one file.
Maybe a programmer or other knowledgeable person could tell us more about this.

Remember to Enter The Website Email Address

A special note: I had forgotten to put a valid email address for the website in "Administer>Settings". This caused my website not to email out the user registration and confirmation information to the users. This meant that when I logged in as the first user, I never received an email from my website. I'm fortunate that Drupal let me stay logged in after I registered as the first user. Otherwise I'd still be locked out.

I think most of my problems (of not being able to get a fresh password) could have been elimated if I had of just thought to put a valid email address in the "Administer>Settings" section.

Stephen
winterssewing.com/drupal

Stephen Winters’s picture

Website Down Again

After I was finally able to get back into the the website (see previous message above), and added the working website email address. I added another user (my wife). I wanted to test her log on, and so I logged on using her ID and password. Now the "who's online block" showed that there were 2 users on the website, both her and I were supposedly online at the same time. A few minutes later it also showed a visitor on the website. Since I just put the website up, it is highly unlikely that a visitor could have found it. So that means that it counted me as both a user and a visitor at the same time. This seems to be a continuation of the same problem mention under the heading of "I was locked out" in my previous message above. Another problem appeared. Most of the navigation menu disappeared. The menu block was still there, but only had about 3 items on it. The log off button also was not available. There was no way to log off the website. I tried logging on several times to see if that would help, but nothing changed. I finally gave up for the night.

No Web Page, Just Error Messages

This Morning when I came back to the test website, I couldn't even get to the website. Where the website should have been there was only a white page with this error message:

Warning: main(/mnt/web_w/d45/s03/b02352ff/www/drupaltest/config.php): failed to open stream: No such file or directory in /mnt/web_w/d45/s03/b02352ff/www/drupaltest/includes.php on line 7

Fatal error: main(): Failed opening required '/mnt/web_w/d45/s03/b02352ff/www/drupaltest/config.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/web_w/d45/s03/b02352ff/www/drupaltest/includes.php on line 7

How Can I Fix This?

Can someone tell me what is wrong and how to fix it? I know that one way I can fix it is just delete the database and replace all the files in the root directory (as I explained in the previous message), but I'd rather try to figure out what is happening and how to fix it. Is this a bug in Drupal 4.7?

This Drupal test website, website 1 (which is the test website I wrote about in the previous message) is a fresh install. My other test website (website 2), has a duplicate copy of the data from my live website.
Since I've had a couple error problems in a row with test website 1, I'm getting a little bit hestitant to upgrade my live site to 4.7. Although, If I can figure this out, I may go ahead and try out test website 2 for a while before I decided whether to upgrade my life website. I think that I'm going to wait on upgrading my live website until I get this figured out a little better, and see how test website 2 does. I might even install and upgrade another test website. I like the idea of doing some practice runs before upgrading my live website.

Best Wishes,
Stephen
winterssewing.com/drupal

cmsproducer’s picture

It seems that the first time you tried to login and did not go beyond the login screen but showed as a logged-in user, you were experiencing the cookie persistence issue outline in http://drupal.org/node/30908#comment-122429.

Second problem: In Drupal (pre 4.7), when your equest a new password, it actually disables your existing password and sends you a new password. So if you have an SMTP prpblem or are not able to receive the new password for any readon, you will be stuck outside your own website and may have to use a different admin account to go in and change your password to what you know (I always create a secodnary Admin account that I keep unchanged under lock and key for these situations). Otherwise changing the database is the only way to fix the situation and since passwords are not stored in clear text (they are encrypted), you cannot just go in and edit the password of your locked account.
So in your case, you requested a new password and locked your account... and when you went into the DB and reset the password, it was not well translated through the encryption into what you actually typed in...

More info.
Drupal does not store anything int he file system except uploaded and attached documents and images... so deleting the database makes the site behave like a new installation.

If you have a website with informationt hat you do not want to loose but are locked out... A good way to enter again is to go into phpmyadmin and backup the user tables in the database, delete it and then recreate it using the mySQL definition found int he BIG database.mysql file in the installation files (only run the section that creates the USER table). this will eliminate all your users and allow you to create a new user accout (UID = 1) who will have admin access to create other users and rebuild your roles etc.

Before you implement this, please consult me so that I can run a test of my procedure to make sure that you will cause a mismatch in any auto-incremented indices and crash your DB.

This is an asnwer to a question fielded ina different discussion http://drupal.org/node/30908#comment-122446

-----
iDonny - Web Content Management System Design, Development. & CRM