By vako on
I an using Drupal 6.6 and it is working great. Of course I would like to upgrade to 6.9 ASAP. However, reading all the posts that people are having with the upgrades, I am SCARED!!
Also I read the instructions for the upgrade and it's not straightforward, there are so many steps!! and if one of them goes wrong the whole site might fail.
I initially loaded Drupal by Fantastico from within cPanel. But they don't have 6.9 upgrade yet and since I moved it from the test folder to the root, Fantastico is not finding it anymore!
My question is:
Comments
Upgrading
Really, it's not hard at all. The instructions in the Upgrade file are just comprehensive. When I looked at them for a first time, I went wow...but once you read them you will realise the key instructions are between steps 4 and 10 while also paying attention to the rest of the text.
Here are the general rules. (I take no responsibility if this fails, it worked for me)
The best thing to do before doing all this is to install an offline Apache distro and install Drupal. Then try upgrading it. This way you will see what to expect when upgrading the real one.
-> Create a backup of the database using phpMyAdmin (Do you know how to do this?, it's easy,
normally phpMyAdmin has the recommended settings selected for you)
-> Create a backup of the entrie "/" drupal install (public_html/drupal_folder to your hard drive)
-> Put the site into offline mode | Admin->Site Configuarion->site Maintenance
-> Select one of the generic themes
-> Disable all the modules
-> Back up "sites" and "files" (transfer them to your hard disk)
-> Delete the old Drupal files in "public_html/drupal_installation" folder
-> Upload the new 6.9
-> Restore the old "sites" and "files" folders into the new 6.9 folder "/"
-> Restore the old .htaccess and "robots" file from the old site to the root of the new drupal files
-> I personally set all permissions to RWX -> 777 but this is a bad idea - read on
-> Run Update.php
-> Any permission related security warnings that will be thrown at you, what should be non-writable and what should be writable etc
should be fixed immediately
-> Reactivate the modules but first make sure they are compatible with the new installation
-> Reactivate the theme
Make sure you do NOT close the browser window until the upgrade is finished
Cheers,
Thank you Mark_J, good
Thank you Mark_J, good advice. I have the following question though:
1. phpMyAdmin has only the Export option, which I suppose the backup, right? now if I import that export file to a brand new DB:
a) does that db needs to have exactly the same DB name as before or will the import restore the DB entirely, including the name?
b) do I have to create any schemas or permissions in the new DB?
2. Your instructions talk about the site upgrade only, what about the DB, do we need to upgrade it as well? Do I have to follow anything in the INSTALL.mysql.txt file?
3. You mentioned "set all permissions to 777", is that only for the .htaccess file? and after copying do I have to change it back to 644?
thanks again.
=-=
NOTE: This is what I do on a NON fantastico installation. I don't know how this will work for you.
ENSURE YOU MAKE BACKUPS!
1. Yes Export is correct
a) no, but if you alter the DB name, DB username and DB password, you need to change the $db_url line in settings.php so that drupal can connect to the database
b) You should follow drupal system requirements in this case. I typically grant my DB user all permissions
2. The DB is upgraded when you run update.php
3. you don't really have to go through that whole process unless you are removing the entire file/folder structure. I say you can leave the sites folder alone keeping entact all that is in it. ie: this is where your uploaded files reside as well as your contrib modules and theme and most things important to your specific installation. I also state that you don't have to disable any modules because you are only moving up a minor version. You only have to disable modules when you are moving major versions. ie Drupal 5.x to Drupal 6.x because drupal 5.x modules will not work with drupal 6.x thus disabling them is a best practice as they will have to be upgraded too.
Going from 6.8 -> 6.9 is as simple as
put site in offline mode
back up your DB and files
delete all files and folders except the sites folder
upload all 6.9 drupal files and folders from 6.9 except sites folder
un update.php
The only files you will need to replace in drupal, is your robots.txt and your .htaccess. You only have to replace them in the new install if you've customized them.
Soo-oh many places...
The info is at so many places within drupal and often conflicting, regarding upgrades/updates...
Why not declare one page as the official wiki and edit that for what lacks in it?
Then only giving a link to that wiki and avoiding excessive comments without administering that info into that wiki !
Its a nice list, but also there lacks something... I've just updated, so I'm not sure yet about errors, but I was aware I had to bring over at least a few other issues:
Oeps; I was logged out of my account (maybe cleaned the cookies for another reason or whatever) and couldn't get in back, because the site was partly blocked because of the service mode. Luckely Google provided a quick answer to log in again:
http://somesite.xxx/drupaldir/?q=user (user literally, not your username!).
I looked in all the drupal dirs for the permissions of the files; I made them at least 644, what means that they are readable by everyone and writable by the user (admin) only, neccessary for the install.php
After install, I had to copy changes back into the NEW settings.php (copy the NEW settings.default.php and give temporary permission at least 666). Like site-cookies, database prefix and a piece of code belonging to simpletest.
Ofcourse .htaccess very important, as it has url-rewrite and other data for uploading files (100M) and longer time in order not to get jammed after 30 seconds etc. on some drupal pages, like my extensive module page. Some other issues, like civicrm files. Normally they come back if one just copies the whole old sites directory back into the new install. But before copying; first rename your old settings.php to settings.old6.8.php and make the permissions 444 = read only. Delete the old default.settings.php before copying the old sites dir back into the new install.
I'm quite tired now, so I could have forgotten something to tell here.
Help
Hello,
Brilliant advice thank you.. done all on list however I am getting "page not found" errors when I try to login and also when clicking on blog link and contact link etc.
Is there something I have done wrong during the set up process?
Any advice would be much appreciated.. fairly new to Drupal.
Thanks
J
Well if you compare the
Well if you compare the listed points above, you will see that the UPGRADE.txt file included says exactly the same but it is a lot more comprehensive. There could many issues related to page not found. It normally means what it says (don't mean to be rude). Probably a file is missing.
I would delete the old installation and try again and make sure all files transfer successfully. FileZilla has a "failed transfers" tab on the bottom.
Again, I strongly encourage everyone to try out something like XAMPP and play around with it and Drupal before messing around with the online version.
Hi Mark, I am unable to
Hi Mark, I am unable to find a folder called files, however there is only one under the sites folder, is that the one you are referring to?
thanks!
Yes
Hi Vako,
Yes, the folder titled "files" is within the sites folder!
Have a read of INSTALL.txt (within your Drupal folder) for full instruction in case you are unclear
Sorry
Sorry for my late reply.
"files" may not exist if the "uploading" module isn't enabled or if no one has uploaded any files (I think).
Cheers,
=-=
I can't help you with a fantastico update. I don't use it to install scripts unless it is merely for testing purposes.
Besides you run the risk that when fantastico finally does get to 6.9, it can FUBAR your site as well.
The steps are necessary. Ensure you backup your site's databse and files before you do anything to your production site.
There are threads around about fanatisco, you should read them. There is also a method described in the drupal handbook for updating a site that was originally installed with fantastico.
I'd get out from under that type of install myself. It helps better your understanding a bit installing frupal on your own and learning to use the tools you have available to you like FTP and phpmyadmin and the like.
Thank you, I will try to
Thank you, I will try to find the location in the handbook where they talk about that upgrade.
I will avoid using Fantastico anymore.
I originally used Fantastico
I originally used Fantastico when i installed my site some time back, not the bets move but i was young :)
There is a file fantversion.php placed in the drupal installation folder whcih seems to control updates. I renamed mine to fantversion.php.old and Fantastico then reported manual upgrade only available. So basically if that file isnt there you should have little to worry about If you move theinstallation location that also tends to get the same response from Fantastico
I have since moved from 4.7 through all of 5 amd am currently running 6.9
Basially take it one step at a time, and dont rush. If in double write a checklist which you can use as a reference each time you upgrade
Easy backups
For easy database backups -manual (before upgrading, etc.) or scheduled-, there is a quite popular Drupal module, Backup and Migrate.
You could also see the handbook page Back up your Drupal site.
Module to upgrade modules
Plugin Manager is a convenient module to install and update modules and themes.
There is also a postponed issue -Automate drupal upgrades?- on adding functionality to upgrade Drupal itself.
A related thread: Is a different approach in upgrading possible?
Staging
I was able to recreate my website on another domain with ver. 6.6 and then upgraded to 6.9 without any issues.
So tonight I will upgrade my main website. Will keep you updated. Thanks for all the help everyone!
It was extremely simple process actually, so let's see....
Yes
Yes it is but a lot of people get scared when they see lengthy instructions -- when in fact they are trully simple.
DONE!
I finished the upgrade and it was successful but stressful...here's why:
Everything worked fine -> the backup of files and db (cPanel has a very nice backup utility), deletion of files, copying of 6.9 files over, copying of sites, .htaccess, robots.txt. All went well but when I opened the site I got a blank screen!! I didn't pee in my pants yet...;)
I tried to log-in to admin and still didn't work. Then I tried update.php and it gave an error of some sort and it told me to bypass the error I had to edit the settings.php file and change the $update_free_access = FALSE; line to $update_free_access = TRUE; temporarily.
I did, but I couldn't FTP the updated file over, even though I had changed the permissions to 777 on the server!!! (I pulled my hair and now I am bold)
I had to call my hosting support and discovered that using the File Manager in cPanel or Unix command line is the solution for my problem. FTP clients don't work correctly in some instances and this was one of those instances...
So the File Manager worked without a hitch and once I was able to run update.php, the whole site came back. It was beautiful, I tried very hard not to kiss the screen...;)
Then I didn't forget to change the $update_free_access = FALSE; of course!
Now I am a happy Drupal 6.9 user!
Thanks all for your help, specially Mark_J & VeryMisunderstood, both of you are always there for us and fast! Thank you!
...I'm not SCARED anymore!
...I'm not SCARED anymore! In fact I have a better understanding now of how Drupal works and hope I can help others in this forum, but I still have a lot to learn too. We all do. Was a good experience for me and a learning curve.
Probably the reason you
Probably the reason you couldnt FTP the file is because teh settings of the folder. I had this issue too, but i don't have enough hair to chance pulling some :)