Updating awebfactory.com.ar from 4.7 to Drupal 5

aWebFactory BeforeaWebFactory Before Before & After aWebFactory AfteraWebFactory After

Fortunately the old 4.6 site was already upgraded to 4.7 relatively recently.

aWebFactory BeforeaWebFactory Before Before & After aWebFactory AfteraWebFactory After

Fortunately the old 4.6 site was
already upgraded to 4.7 relatively recently.

First steps

Read the manual 🙂

So, since the handbook has nothing, head on over to Lullabot, and
check out the video!

Webchick here assures us that if we follow the instructions we’ll
have nothing to worry about… so, here goes!

Step 0 – Evaluation

Do I want to evaluate or not. Affirmative, skip to next step.

Step 1 – Backup

OK, a swift mysqldump to a file, then tar up the whole thing, and,
install on home dev box to make sure you really have got everything
running ok on the basis of a good backup.

Question: What contributed modules and themes am
I using?

Modules

aggregator

Aggregates syndicated content (RSS, RDF, and Atom feeds).

archive

Displays a calendar for navigating older content.

block

Controls the boxes that are displayed around the main content.

required

blog

Enables keeping an easily and regularly updated web page or a
blog.

blogapi

Allows users to post content using applications that support
XML-RPC blog APIs.

book

Allows users to collaboratively author a book.

buddylist

Enable buddy list functionality.

comment

Allows users to comment on and discuss published content.

contact

Enables the use of both personal and site-wide contact forms.

drupal

Lets you register your site with a central server and improve
ranking of Drupal projects by posting information on your
installed modules and themes; also enables users to log in using
a Drupal ID.

filter

Handles the filtering of content in preparation for display.

required

forum

Enables threaded discussions about general topics.

freelinking

Enables freelinking between nodes using CamelCase and
delimiters (like [[ and ]]).

help

Manages the display of online help.

image

Allows uploading of images.

image_attach

Allows easy attaching of image nodes to other content types.

image_gallery

Allows sorting and displaying of image galleries based on
categories

img_assist

Enables users easily upload and insert images into content.

invite

Allows users to send GMail style invitations, and
automatically escalates new users who use them to a role of your
designation

legacy

Provides legacy handlers for upgrades from older Drupal
installations.

locale

Enables the translation of the user interface to languages
other than English.

menu

Allows administrators to customize the site navigation menu.

node

Allows content to be submitted to the site and displayed on
pages.

required

og

Organic groups

og_basic

Basic group node for Organic groups

page

Enables the creation of pages that can be added to the
navigation system.

panels

The panels module allows the creation of pages with flexible
layouts.

path

Allows users to rename URLs.

ping

Alerts other sites when your site has been updated.

poll

Allows your site to capture votes on different topics in the
form of multiple choice questions.

profile

Supports configurable user profiles.

project

Provides a project node type and browsing of projects.

project_issue

Provides issues tracking for the project.module.

project_release

Provides a project release node type.

search

Enables site-wide keyword searching.

statistics

Logs access statistics for your site.

story

Allows users to submit stories, articles or similar content.

system

Handles general site configuration for administrators.

required

tagadelic

Tagadelic makes a page with weighted folksonomy. Folksonomys
with lots of articles under them get a big font-size, folksonomy
without them, get a small size.

taxonomy

Enables the categorization of content.

throttle

Handles the auto-throttling mechanism, to control site
congestion.

tinymce

The TinyMCE Javascript HTML WYSIWYG editor.

tracker

Enables tracking of recent posts for users.

upload

Allows users to upload and attach files to content.

user

Manages the user registration and login system.

required

watchdog

Logs and records system events.

required

Themes
  • Greybox

Question: Have all modules and themes been ported
yet?

Well, local Buenos Aires talen is hard at work designing me a spanking new Blog theme, and
even so, greybox offers no difficulty. So… modules?

The only module that could offer difficulty is Project and Project
issue… but these days I set up a whole process flow and tracker
subdomain for each project in its own right, so I wouldn’t want to
even include this stuff on this more blog, content friendly site.

But ‘sposing I did, will try to anyway.

All other modules are ported and pose no problems.

A quick check at drupal.org confirms this.

Note: in this case I haven’t got any custom modules or theming I
have done myself, so I don’t have to worry about that.

Download Drupal 5.x release and the latest Drupal
5 versions of each module

Backup site – so you can always go back!

Drupal database snapshot (database dump)
  • From some convenient place onsite: mysqldump -u user -p
    databasename > filename.sql

  • Or, use phpmyadmin: choose database, export, select all
    tables, check the save as file checkbox and click the Go button. See
    Lullabot video to show this in action, and also for an excellent
    demonstration of restoring a database using the saved database
    snapshot.

Drupal folder tarball
  • From the parent folder of the drupal root folder
    (where you can see the mysite folder as a child folder): tar cvzf
    mysite-yyyymmdd.tgz mysite

  • Should you need to restore this folder, do: tar xvzf
    mysite-yyyymmdd.tgz

Step 2 – Preparation

  • Login as User ID #1

  • Go to offline mode
    To get back, go to
    http://example.com/user and
    login as administrator.

  • Disable custom and contributed modules (anything not core).

  • Switch to core theme

Step 3 – Upgrade

  • If in a subdirectory, rename it and make a fresh Drupal
    install
    in a new folder named the same as the original one.

  • Copy over sites and files folders.

  • Run update.php
    Of course, this is kind of scary, because
    when you first access your site after replacing all the 4.7 drupal
    files with 5.1 drupal files, we get this scary message:
    Fatal
    error
    : Call to undefined function: user_access() in ….
    ./includes/menu.inc on line
    1380

    But this goes away as soon as you just run update.php, and you
    can view your site in Bluemarine (or Garland) splendor..

  • Install and enable contributed and custom modules and themes

    • All non-project related

    • Except og now requires views, so leave for later

  • Re-run update.php

  • Install cck and views, and date, enable together

  • Enable og

  • Got this error message:
    user warning: Table
    ‘awebfact_drpl1.og_uid_global’ doesn’t exist query: SELECT og_email
    FROM og_uid_global WHERE uid = 1 in
    /var/www/awebfactory/includes/database.mysql.inc on line 172.

  • Re-run update.php
    This worked ok, but the message didn’t
    go away from the update.php page.
    Brazenly went ahead, no
    problem!

  • Everything seems to be working ok.

  • Backup database and…

  • …Install and enable project*
    modules
    project-5.x-0.1-beta
    project_issue-5.x-0.2-beta

  • Re-run update.php

  • WORKS!!!

Step 4 – Test

Works!

Then went on to install captcha and other blog related stuff, and
new theme!