|
Contents
|
 | Upgrade Instructions Only This page provides instructions for Upgrading CiviCRM installations on Joomla from version 1.9 to 2.0.
|
 | Version 2.0 Requirements Before beginning this upgrade, verify that your server meets the requirements for CiviCRM 2.0.
- PHP 5.x : Starting with the 1.9 release, CiviCRM will NOT run on PHP4 servers* (more info...).
- MySQL 5.0.x or higher : CiviCRM is compatible the current generally available MySQL release.
- Joomla 1.0.14 : CiviCRM 2.0 is not officially supported on Joomla 1.5..
|
 | Upgrade a Copy of Your Site First and Make a Complete Backup We strongly recommend that you do a test run on a test server before trying this on a production site. In any case, you should create a full backup of the installed civicrm directory tree and civicrm database before beginning the upgrade process. |
- Make a copy of your website and your database and ensure that it is a valid working copy by logging in to the Administrator site and navigating to several CiviCRM pages. For simplicity make sure you have easy access to both copies of civicrm.settings.php as you will need to reference them later.
- Rebuild your 1.9 Database to Ensure Schema Integrity
 | If your 1.9 database has been upgraded from a prior version - and you did not previously run these steps - you must complete the following steps in order to prevent errors during the upgrade to 2.0. You may also prevent errors by evaluating your activity history according to Migrate 3rd Party Activity History Records to 2.0 and making changes accordingly before rebuilding your 1.9 database. |
 | Purpose of Schema Integrity Step CiviCRM 2.0 has numerous schema changes from the previous version. Because of these changes and their impact on existing data when running the upgrade script, it is critical your current database have a fully intact 1.9 schema. The steps that follow help ensure the integrity of your 1.9 schema. This is done by: 1) creating a clean 1.9 database (absent data); 2) importing your existing 1.9 data into the clean schema; and 3) continuing with the upgrade process using this "schema-verified" database. |
 | Run test upgrade on copy of site; Take site offline for live update As indicated earlier, you are strongly encouraged to run through the entire upgrade process on a copy of your site data before planning the live data upgrade. Once you've tested the upgrade process on your site copy and resolved any issues, take your website offline to implement the live data upgrade. |
- Create a new, empty, MySQL database. We'll call it civicrm19Fix for this example. You do not need to install Joomla into this database. It will only be used temporarily to recreate your current CiviCRM 1.9 data within a verified schema.
- Load the 1.9 table structure into this new database by sourcing com_civicrm/civicrm/sql/civicrm_41.mysql (found in your existing 1.9 codebase).
shell > mysql -u crm_db_username -pcrm_db_password civicrm19Fix < civicrm_41.mysql
 | Using phpMyAdmin If you do not have shell access or simply prefer using a GUI interface for database management, you may use phpMyAdmin. Login to phpMyAdmin and navigate to your newly created database by clicking the table link in the left column. Select the "Import" tab, browse to com_civicrm/civicrm/sql/civicrm_41.mysql in your 1.9 codebase, and import the file. You should receive a confirmation message indicating the schema has been imported, and will notice your database is now populated with civicrm_ tables. |
- Dump the data ONLY from your existing 1.9 database to a file:
shell > mysqldump -u crm_db_username -pcrm_db_password -c -e -n -t civicrm19 > dumpFile
 | Using phpMyAdmin Navigate to your existing 1.9 database. Select the "Export" tab. In the list of tables, select ONLY the civicrm_ tables. UNCHECK all of the checkboxes in the "structure" area of this screen. Click "save as file" and GO to proceed with the export. |
- Populate the new empty database with your data by sourcing the dumped file:
shell > mysql -u crm_db_username -pcrm_db_password civicrm19Fix < dumpFile
 | Using phpMyAdmin Navigate back to your new schema-fixed database (civicrm19Fix) and click "Import." Browse to the file saved in the previous step and import it. You now have imported your 1.9 data into the schema-verified 1.9 database. At this point, you need to move this entire database (schema + data) back to your working-Joomla database in order to proceed with the 2.0 upgrade script. Click export from within the schema-fix database. Select all tables (assuming you only have civicrm_ tables in this temporary database). Check the "structure" and "drop table/drop view" checkboxes. Check "save as file" and GO to continue the export. Now import this file into your existing, working-Joomla database. This should drop your existing 1.9 schema and data, and import the schema-verified structure and data. |
 | Alternative Order of Operation Understand that the purpose of the previous schema-integrity steps is to ensure the structure of your working 1.9 database is accurate before proceeding with the 2.0 upgrade. The steps above achieve this by creating a temporary database, moving data into it, and then moving the entire temporary database (data+structure) back into your working database.
An alternative order of operation which achieves the same purpose and may be easier to conduct (particular when implementing on the live site) is as follows:
- Create a new temporary database civicrm19Fix
- Move civicrm_ tables from Joomla database to civicrm19Fix
- Download the attached file: move_tables_civicrm19Fix.txt
- List the civicrm tables in your Joomla database. Execute the following on your mysql server using a user with privileges on the Joomla database and giving the user's password when prompted.
shell> mysqlshow -u user_name -p Joomla_db_name civicrm%
- Edit the file and replace all instances of JOOMLA_DB with the name of your Joomla database. Compare the table list from mysqlshow with the tables in the file. If your table list is different, edit the file accordingly. Save the file and move it to your mysql server.
- Execute the following to move the tables using a user with privileges on the Joomla database and giving the user's password when prompted.
shell> mysql -u user_name -p < move_tables_civicrm19Fix.txt
- Now that the civiCRM data is isolated, dump it to a temp file
shell > mysqldump -u user_name -p -c -e -n -t civicrm19Fix > dumpFile
- Import/source SCHEMA from 1.9 sql file (civicrm_41.mysql) into Joomla database.
shell> mysql -u user_name -p Joomla_db_name < JOOMLA_ROOT_DIR/Administrator/components/com_civicrm/civicrm/sql/civicrm_41.mysql
- Import/source DATA from file created in step 1, into working database.
shell> mysql -u user_name -p Joomla_db_name < dumpFile
|
- Login to your Joomla! Administrator site.
 | You must stay logged in to Joomla! during the remaining steps in this process. Logging off and trying to log back in while CiviCRM is partially upgraded may result in fatal errors trying to access your site. |
- Uninstall CiviCRM using the component uninstaller.
- Download the v2.0 CiviCRM Package from SourceForge. Select the Joomla compressed downloads. EXAMPLE: Select civicrm-2.0.xxxx-joomla.zip
- Upload this file to your server in your home directory and unzip it. Let's call this location HOME. Ensure that this is in a different directory from your Joomla! installation directory (lets call this JOOMLA_ROOT). You should now have a com_civicrm directory in your HOME directory with lots of sub-directories and files below it.
- Edit the file HOME/com_civicrm/configure.php and make the following change on line 10.
 | Data Loss Warning Updating configure.php as shown below is critical. Make sure you find the right file and save the change. Otherwise, your existing CiviCRM data will be over-written. |
$civicrmUpgrade = false;
$civicrmUpgrade = true;
- Install the latest CiviCRM codebase, using the Install from Directory option. Point it to the directory HOME
- Upgrade the database to 2.0 by running the web-based updater from your browser:
- Point your web browser to the following URL:
http://<your_joomla_home>/administrator/index2.php?option=com_civicrm&task=civicrm/upgrade&reset=1
- You should see the CiviCRM 2.0 Upgrade: Step One screen.
- Click Begin Upgrade.
- There are five steps to the upgrade. Click Continue for each step. You will see an Upgrade Successful screen when the process is completed.
- You must complete all steps in order to have a valid 2.0 database. If you receive any errors during the process, please note down the exact step and error message, and check for solutions on the community support forum.
- Log out of Joomla.
- Delete the files in
JOOMLA_ROOT/media/civicrm/templates_c
and
JOOMLA_ROOT/media/civicrm/upload
- Temporarily enable CiviCRM debug features:
- Go to Administer CiviCRM » Global Settings » Debugging
- Set Enable Debugging to Yes and click Save.
- Click the Administer CiviCRM menu (or any other CiviCRM menu item). After the page is loaded, add two additional query string values (&sessionReset=2&directoryCleanup=1) to the URL in your browser's location bar, and reload the page. (You may see a large number of missing file warning messages on your screen - depending on how your Error Reporting option is configured. These are expected and will disappear on the next page request.)
- Now reset Enable Debugging to No and click Save.
 | Do Not Leave Debug Features Enabled for a Public Site Debugging should be disabled for publicly available sites as it may allow browsers to view system configuration information. |
 | The following step is required if you are using PayPal Pro and/or PayPal Express. Otherwise, you can skip this step. |
- Navigate to Administer CiviCRM » Global Settings » Payment Processors and Edit your PayPal processor settings. Verify the values of BOTH the Site URL and API URL fields:
- You should be up and running with the latest CiviCRM version. Confirm by checking the footer at each page.
- Recreate any Joomla menu links to Profiles, Contribution Pages or Events.
- Navigate to Administer CiviCRM » Global Settings » Joomla Integration and check the values for version and user table. The default user table in Joomla is jos_users.
 | Additional Locations The number of locations/addresses shown on the contact editing screen controlled from Global Settings » Address Settings as of version 1.9. The default value is 1. If you want 2 or more locations to available when adding new contacts - you'll need to modify the Number of Locations value. |
Related Resources
Configuring Front-end Profile Listings and Forms in Joomla! Sites
Displaying Online Contribution Pages in Joomla! Frontend Sites
|
|