I figured it was time to make one of my howtos. The Drupal UPGRADE.TXT file is fairly straightforward:
- Backup your database and Drupal directory – especially your configuration file in ‘sites/default/settings.php’.
- Log on as the user with user ID 1.
- Remove all the old Drupal files then unpack the new Drupal files into the directory that you run Drupal from.
- Modify the new configuration file to make sure it has the latest and correct information.
- Run update.php by visiting http://www.example.com/update.php.
But everyone knows things aren’t usually as they seem, so I went ahead and made a whole drupal howto on my own with pictures and everything. Here goes:
First a few important notes.
- I use Windows.
- The site I’m about to update is Pinoywritersonline.com.
- Drupal 4.7.3, released early August, is a maintenance release + one security fix. It does not have any new features so it’s not a major upgrade or anything, so most of the settings will remain the same plus you don’t have to learn anything new.
- The pinoywriters installation like most drupal installations uses a theme other than the default one, which also happens to be compatible with both 4.7.2 and 4.7.3. This is important to know later on during the guide, where you might wonder why I did not write over or delete the /THEMES folder. I didn’t delete it even when the instructions say I should, because I do not want to install it again.
- Like most people, I rent space on a webhosting service, which like most webhosting services, run Cpanel.
- Cpanel in turn uses Phpmyadmin, a powerful graphical MySQL editing tool. This is important to note since Drupal first time users are often confused with the included HOWTOS which assume terminal / root access to the webserver, hence commands like WGET -zxvf and MV. So to qualify: if you have terminal access and linux / unix skillz, follow the default HOWTO. If you prefer the more common graphical method and use Windows, follow below. (hence why i named this ‘for the rest of us’)
- Obviously, I use MySQL, provided by my webserver.
- Finally, for FTP I use Filezilla, but you can use any other.
Ok, ready? Let’s go:
- First, download Drupal 4.7.3 here. It’s compressed using the .tar.gz format, which Windows XP does not recognize. Why its not available in .zip I do not know. Anyway, you can use Winrar to deal with that.
- Now, login to your website, using the primary account (the very first account you created).
- Now let’s do that database backup. Create a folder and name it appropriately such as my ingenious, “aug122006_database_dump” on the folder where you usually put your project files on.
- Now, login to your host’s Cpanel area, and go to SITE MANAGEMENT > PHPMYADMIN.
- Go to the database in question, and to it’s EXPORT area. You’ll want to select all your database’s tables to back up, so click SELECT ALL. Click SAVE AS FILE and then press GO.
- Your browser will start downloading your .sql file. Save it in the folder we created in step 1. You have now backed up your database.
- Now to backup the ‘sites/default/settings.php‘ file. Use your FTP software (I use Filezilla). Go to it, and copy it to a folder on your PC just like you did above.
- As a habit I keep an exact copy of what’s on the webserver on my hard disk. Doing so, it’s a simple matter of dragging the ‘live’ settings.php file to the copy on my hard disk. Most FTP software will warn you that they’re about to copy over a file, and a window like the one below will popup. Notice the same date and time, which means they’re the same exact file. Go ahead and overwrite it anyway, just so you’re assured you’ve got the same exact copy.
Congratulations! You have now done a backup of your database and settings.php file, the two important files you’ll need to recreate your website should you need to. You can now proceed recklessly along knowing that if you screw things up, you have these anyway. Just kidding. Follow these steps strictly.
- Now, delete all the files about to be replaced, EXCEPT FOR THE /SITES and /THEMES folder. /SITES contains the settings.php file, which you don’t want to change, and /THEMES contains the current theme you’re using (provided you’re using a theme other than the default one).
If you delete /THEMES, you’ll have to install your theme again.
- Here’s how it should look. Highlight ONLY the ones you’re about to delete, leaving /THEMES and /SITES then rightclick > Delete.
- A few minutes later, after deleting everything, here’s how it looks. The only folders left are /CGI-BIN (which is not deletable as per the webserver’s settings), /THEMES and /SITES.
- Now drag and drop the new drupal files in there, like so. Again, no need to include the /THEMES and /SITES directories. It’s only around 2.12mb, so it will take around a minute or two on a standard DSL connection.
- Time to run the update file. On your browser, enter /UPDATE.PHP after the domain name and press enter.
- This page will appear, with a link saying ‘run the database update script‘. Click it.
- Two more pages. This one:
- And this one. I know these are vague, but Drupal likes it that way, so who am I to argue.
..aaand that’s it!
Honestly, this How To wouldn’t have been necessary if a. the Drupal group would write friendlier howtos, allowing for people who don’t have terminal access,. and b., remember that not all users are linux sysads, such as allowing the download in .tar.gz format only for example.
Imo they should check out WordPress, whose easy to understand ‘5 minute installs’ have surely helped mainstream adoption.
Anyway, if you’re confused, Email or comment below!
powered by performancing firefox