Upgrade Dupal Site Best Practice


Better way to upgrade drupal site.


     Best practice method of updating drupal site, from my personal experience. To upgrade drupal site may need some skill.  The step by step procedures below is produce base on my experience on upgrade my drupal site... from Drupal version 4.7 , 5 till now... Please read UPGRADE.txt that come along with your Drupal.


Please note that this step by step upgrading drupal site is base on my personal experience... and this article is totally not recommended for newbie... and I'm not willing to take responcesibility if anything happen to your site/database... and this article may need some adjustment to meet your Drupal site need... this article made for people who understand how to read :-() Use At Your Own Risk. 


The Preparation


1.  Use Firefox - Install Fireshot add on

2.  Upgrade all module to latest version available.


Backup Drupal

Before upgrade Drupal site... The best practice is to make backup... make backup all the things that related to your Drupal site, from database and all Drupal files and Folder in/on your Drupal web server.  The step below show some of the thing that need to backup


1.  Make sure that you log on as the user with user ID 1.  User ID 1 is the first account created and the main administrator account.  User ID 1 needs to be logged in so that you can access update.php (AFTER UPGRADE process) which can only be run by user ID 1.  Do not close your browser until Final Setup... Bring your site online is complete.


2. Screenshot all setting... block, modules, themes, configuration and other things that you think appropriate.  The example below use the Firefox web browser and Fireshot addon..

(... Configuration Image Here ....)


3. Take the site off-line for maintenance.


* Administer --> Site configuration --> Site maintenance : Site status:  Off-line


4. Disable all module - accept core required module and core optional module (Please recheck 2 times)


Administer --> Site building --> Modules


5. If your dupal site using clean url... please diisable the clean url first.  After disable clean url your Uri should be look like Clean URLs - disable => http://YourDrupalSite.com/?q=admin/settings/clean-urls


* Administer --> Site configuration --> Clean URLs  :  Clean URLs:  Disabled


6. change theme to default theme.  bluemarine: themes/bluemarine (choose bluemarine theme as example)


* Administer --> Site building --> Themes


7.  Backup Drupal database


8.  Backup all configuration files and folder.


       /files folder and /sites folder most important one (other files need to backup 2)


Prepare new Drupal to update


Extract open new version of Drupal..... Please EDIT and save files listed below......


File need to edit before upload


1.   /.htaccess (on site mod 644)(copy setting from backup file....)


-----------Setting need to copy from .htaccess - the setting example-------1-----

# Set the default handler.

DirectoryIndex index.php index.html


# Various rewrite rules.

<IfModule mod_rewrite.c>

RewriteEngine on

# If your site is running in a VirtualDocumentRoot at http://example.com/,

# uncomment the following line:

RewriteBase /             <---- only for sub domain



2.  File /sites/default/settings.php (on site mod 644)(copy setting from backup file........)


-----------Setting need to copy from settings.php - the setting example-------2-----


* Database settings:



$db_url = 'mysql://username:password@localhost/databasename';

$db_prefix = '';



FOLDER and its contents NEED TO DELETE on the web server (be carefull)














Do not delete 3 folder on current web server

1. /files

2. /sites

3. /tmp


NEW DRUPAL FOLDER and its contents NEED TO upload














1.  Do not upload the /sites folder to current web server





2.  Just upload upload the new edited version of setting.php from /sites/default/ to current web server






3.  Upload .htaccess file and other files from root directory to web sever (overwrite all old files....)





1.  View log....

* Administer --> Logs --> Status report (/admin/logs/status)

2.  Settle what need to be done


3.  Don't forget to:  Update your Drupal sources  run the database upgrade script (e.g. http://YourDrupalSite.com/update.php)


Final Setup... Bring your site online


1. Change theme to default theme

2. Clean URLs - enable -->   

3. Enable back all your Drupal module

4. Bring back site to online mode. Site maintenance


Keywords:  updating drupal site, update drupal, Upgrade Dupal, Upgrade Dupal site best practice