 | Upgrading from Versions Prior to 1.9
This page provides instructions for upgrading CiviCRM sites to version 1.9 from earlier versions.
Everything you need to update from earlier versions is provided in the current distributions. You do not need to download prior release packages in order to upgrade to the current version. |
 | Upgrade a Copy of Your Site First and Make a Complete Backup
We strongly recommend that you create a copy of your existing site (directories and database) - and upgrade that copy first in order to make sure you can complete the upgrade successfully. In any case, you should create a full backup of the installed civicrm directory tree and civicrm database before beginning the upgrade process. |
Step-by-step Procedures
Upgrading from any earlier version involves running each of the intervening database upgrade scripts in sequence. For example, if you are upgrading from 1.7, you will run the 1.7 to 1.8 upgrade script, followed by the 1.8 to 1.9 upgrade script. Then you can follow the procedures for upgrading to 2.0:
Step 1 - Download the current stable release
Example: Select civicrm-2.0.x-drupal.tar.gz or civicrm-2.0.x-joomla.zip
Step 2. Take the Site Offline (for production site upgrades)
When upgrading a production site, it is recommended that you take your site offline during the upgrade process and log-off your admin user.
- Drupal: Administer » Site maintenance
- Joomla: Administrator » Site » Global Configuration
Step 3 - Run the Upgrade Script(s) in Sequence
1. Identify the Correct Database Upgrade Script
All upgrade scripts are distributed in the ..../civicrm/sql directory.
 | Up through version 1.8, Script files are named with:
FROM version + TO version + MySQL version (4.0 or 4.1)
Version 1.9 and requires MySQL 4.1+ - so there is no MySQL 4.0 compatible upgrade script.
Example:
civicrm_upgradedb_v1.7_v1.8_41.mysql
Select this script if you are currently running CiviCRM 1.7, with MySQL version 4.1 or 5.x, |
Note down the corresponding script filename for YOUR current CiviCRM and MySQL version.
2. Run the Script
Load and run the selected SQL upgrade script.
- Using phpMyAdmin:
- Select the database you are upgrading.
- Click the Import tab.
- Click Browse, and navigate to the untarred civicrm/sql directory (from the current release you just downloaded)
- Select the file you noted down.
- Click Go.
- OR, from the command line:
- Make sure you know the database name, user and password.
- Move to the civicrm/sql sub-directory.
- Run the script as shown, replacing civicrm_upgradedb_v1.x_v1.y_4z.mysql with the actual filename you noted down.
shell > mysql -u civicrm_user -h civicrm_db_server -p civicrm_db < civicrm_upgradedb_v1.x_v1.y_4z.mysql
 | Foreign Key Errors Running Upgrade Script
If you are getting foreign key errors when attempting to run the upgrade script, you can try adding the following lines to the script and running it again:
-- add this above the first line
SET FOREIGN KEY CHECKS = 0;
.
.
-- add this below the last line
SET FOREIGN KEY CHECKS = 1;
|
3. Repeat 1. and 2. above as needed to get your database to version 1.9
4. Follow the 1.9 to 2.0 Upgrade Procedures to complete the upgrade:
Troubleshooting
Payment Processor and Contribution Page / Event Registration Issues
 | This Step is Required for Upgrades from 1.7 or Earlier IF You Use Online Contribution Pages, Membership Signup or Event Registration
The method for storing Payment Processor configurations changed starting with 1.8. If you are using CiviContribute to collect online contributions OR membership signup and/or using CiviEvent for online event registration - you must follow the steps in this section. |
- Re-enter your Payment Processor information:
- Login with administer CiviCRM permission
- Go to Administer CiviCRM » Global Settings » Payment Processors (the page will say that "There are no Payment Processors entered.")
- Click add one
- Select the Payment Processor Type corresponding to the one you have been using (e.g. PayPal - Website Payments Pro)
- Enter the required account information for your selected processor (e.g. User Name, Password, etc.). As of 1.8 ALL processor configuration information is entered from this screen. You no longer need to enter or edit payment processor passwords, signature values etc. in the settings file (civicrm.settings.php).
- Click Save
- Link your re-entered Payment Processor to each of your existing Online Contribution and Event Registration pages
- Go to Administer CiviCRM » Manage Contribution Pages
- Click Configure
- Click Title and Settings
- Your newly entered Payment Processor should be selected in the Payment Processor field
- Click Save (This is important - the link between the contribution page and the payment processor is not created until you hit Save on this screen.)
- Repeat these above steps for each active Online Contribution page on your site...
- Go to Administer CiviCRM » Manage Events
- Click Configure
- Click Event Fees
- Your newly entered Payment Processor should be selected in the Payment Processor field
- Click Save (This is important - the link between the registration page and the payment processor is not created until you hit Save on this screen.)
- Repeat these above steps for each active Event Registration page on your site...
just as a note, i ran the update through the shell and got the following output:
but everything seemed to have worked well.
Hi Jochen - That is expected output.
Separately, I noticed that you changed a line from using an HTML char entity to using the high ASCII character:
...from this:
Which displays this way:
Administer » Site maintenance
...to this:
Which displays this way:
Administer » Site maintenance
What is the reason for changing this? A slightly undesirable side-effect of your change is that the wiki's bolding markup doesn't work for some reason when the high-ASCII character is used.