replace drupal with pressflow

Primary tabs

Oak Ridge Automatic Computer and Logical Engine, 1953



Replace drupal with pressflow. Pressflow is a version of drupal made by Many stock parts are replaced with after-market parts to make it go faster.


Almost every application I want is provided by the Debian distribution. Pressflow is not.

I can't use Debian's PMS (Package Management System) to install it. MMM is not in Debian's repository either, but at least the MMM people provide a Debian package. The fourkitchens people don't even do that. Crickey! Shocking. Still, no pain, no gain.

  1. Open a CLI on the host ifw03.
  2. Use su to switch to the root account.
  3. Download the first of the files with the wget application.
    ifw03:~# cd /var/tmp
    ifw03:/var/tmp# wget
    --2010-12-23 10:46:39--
    Connecting to||:80... connected.
    HTTP request sent, awaiting response... 303 See Other
    Location: [following]
    --2010-12-23 10:46:39--
    Connecting to||:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1288096 (1.2M) [application/x-tar]
    Saving to: `pressflow-6.19.96.tar.gz'
    100%[======================================>] 1,288,096   1002K/s   in 1.3s
    2010-12-23 10:46:40 (1002 KB/s) - `pressflow-6.19.96.tar.gz' saved [1288096/1288096]
  4. Spread it around. Copy the file to ics01.
    ifw03:/var/tmp# scp pressflow-6.19.96.tar.gz ics01-adm01:/var/tmp/
    root@ics01-adm01's password: Pa55w0rd
    pressflow-6.19.96.tar.gz                      100% 1258KB   1.2MB/s   00:00
  5. Copy the file to the other customer service hosts ics02 and ics03.


Install on ics01. Repeat this procedure for the other customer service hosts ics02 and ics03.

  1. Stop the web server.
    ics01:~# /etc/init.d/apache2 stop
    Stopping web server: apache2 ... waiting ...
  2. Back up current drupal directory
    ics01:~# tar cf /var/tmp/drupal6.tar /usr/share/drupal6/
  3. Create a symlink with the same name as the pressflow directory in the tar file. This will force tar to write pressflow files over the top of drupal files.
    ics01:~# cd /usr/share/
    ics01:/usr/share# ln -s drupal6/ pressflow-6.19.96
  4. copy pressflow over top of drupal. This preserves Debian's symlinks such as /usr/share/drupal6/profiles -> /etc/drupal/6/profiles
    ics01:~# cd /var/tmp
    ics01:/var/tmp# gunzip pressflow-6.19.96.tar.gz
    ics01:/var/tmp# cd /usr/share
    ics01:/usr/share# tar xf /var/tmp/pressflow-6.19.96.tar


There are two parts to configuration. One is pointing drupal to the mysql database.

  1. back up /usr/share/drupal6-test/sites/
    ics01:/usr/share# cd /usr/share/drupal6/sites/
    ics01:/usr/share/drupal6/sites/ cp settings.php settings.php-old
  2. copy default.settings.php to settings.php
    ics01:/usr/share/drupal6/sites/ cp default.settings.php settings.php
  3. Edit settings.php.
    ics01:/usr/share/drupal6/sites/ vi settings.php
  4. find the line
     $db_url = 'mysql://username:password@localhost/databasename';
  5. Replace with
    if (!isset($dbserver) || empty($dbserver))
    $db_url = "$dbtype://$dbuser:$dbpass@$dbserver/$dbname";
    This links the drupal settings file to the Debian settings file.

Drupal will try to contact itself using the web site name I give it ( It will fail to ge a response from the IP address The status report will show an error for "HTTP request status". Override this with a hosts file entry.

  1. Back up /etc/hosts
  2. Edit /etc/hosts
  3. Add these lines.
    # a fix for HTTP request status problem. 

A couple of the modules need updating (system and dblog) from drupal v6.6 to pressflow v6.19.

  1. go to URL
  2. Start update. A list of results is displayed in a mix of English, SQL and jibberish.
    The following queries were executed
    system module
    Update #6052
        * ALTER TABLE {menu_router} ADD INDEX tab_root_weight_title (tab_root(64), weight, title)
    dblog module
    Update #6000
        * ALTER TABLE {watchdog} CHANGE `referer` `referer` TEXT DEFAULT NULL
    There is one failure. An index does not exist so it can't be dropped.
     Failed: ALTER TABLE {url_alias} DROP INDEX src_language
    The status page may complain about "Drupal core update status".


Start the web server.

  1. start apache2
    ics01:/etc/php5/apache2# /etc/init.d/apache2 start
    Starting web server: apache2.

check your work