This documentation refers to CiviCRM 4.1, the current stable version.

Skip to end of metadata
Go to start of metadata


Documentation Search


CiviCRM 4.1 Documentation

Developer Resources


CiviCRM books!

Make sure to check out our Online User/Administrator and Developer Guides! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

NOTE: You need PHP5 installed and working (note also you must have php-xml installed if your distribution does not include DOMXML support in the mail PHP executable, as is the case in Fedora). If you are using a Mac and don't want to compile your own PHP build, download and install the latest version of MAMP (Mark Liyanage's PHP/Apache set does not include SOAP support).

This document is primarily for developers who want to install and run code directly from subversion.

1) Start with a working CiviCRM install on your server/localhost. If you do not currently have CiviCRM installed, download the latest version and run the installer

2) Check out CiviCRM from the repository to update the code in your civicrm install with the following commands:

3) delete all untracked files from svn st, i.e. all lines that start with '?'.

You can also do it the slightly harder way and install manually .

Make sure you are picking up the right svn version. The example above picks up the 'trunk' directory which is the current development version. For a branch version you would replace 'trunk' with the branch directory (e.g. for v3.4 use http://svn.civicrm.org/civicrm/branches/v3.4).  To see a list of all currently available branches go to: http://svn.civicrm.org/civicrm/branches.
Note: all CiviCRM releases are checked into a branch, and then merged into trunk. So if you are making changes to 3.4 / 4.0, you should check in to branches/v3.4, and that will be merged into trunk. If you need to worry about the different between the CMS versions, i.e. you need different code in the 3.4 and 4.0 branches, then you should check the relevant code into each branch separately.

Using release tags in an SVN installation

If you want to maintain the data in this installation through one or more release cycles, then consider checking out tagged releases rather than checking out the latest revision from a branch. This is particularly useful if you are working with a copy of production data from a stable release over the course of an alpha / beta new release cycle. Learn more

For the scenario where you do want to be running off a branch, but temporarily switch to the tagged release with the intention of switching back to the branch, it can be achieved with "svn switch" but it may be more efficient to download the tarball release, take a peek in civicrm-version.txt to get the revision number, and then do "svn update -r <revision>"

Keeping your SVN install up to date

If you are running a version of CiviCRM that is under active development there will be periodic (possibly frequent) changes in the schema / database objects. An easy way to update your schema and the automatically created DAO files is to run the provided setup.sh shell script whenever you notice schema changes in svn updates (anytime a file in xml/schema is updated - you've gotten some kind of schema change). The script will generate a fresh copy of all the DAO's (running GenCode.php) as well as sql/civicrm.mysql and sql/civicrm_data.mysql - and then drop / rebuild your database.

Configure setup.sh

  • $ cp bin/setup.sh.txt bin/setup.sh
  • edit setup.sh - adding the correct values for DBNAME, DBUSER and DBPASS (for your CiviCRM database)
  • make sure setup.sh has execute permissions

Run setup.sh

  • $ cd bin
  • $ ./setup.sh
Labels
  • None