Upgrading a source install


Before upgrading CKAN you should check the compatibility of any custom themes or extensions you’re using, check the changelog, and backup your database. See Upgrading CKAN.

The process for upgrading a source install is the same, no matter what type of CKAN release you’re upgrading to:

  1. Check the Changelog for changes regarding the required 3rd-party packages and their minimum versions (e.g. web, database and search servers) and update their installations if necessary.

  2. Activate your virtualenv and switch to the ckan source directory, e.g.:

    . /usr/lib/ckan/default/bin/activate
    cd /usr/lib/ckan/default/src/ckan
  3. Checkout the new CKAN version from git, for example:

    git fetch
    git checkout release-v2.0

    If you have any CKAN extensions installed from source, you may need to checkout newer versions of the extensions at this point as well. Refer to the documentation for each extension.

  4. Update CKAN’s dependencies:

    pip install --upgrade -r requirements.txt
  5. Register any new or updated plugins:

    python setup.py develop
  6. If there have been changes in the Solr schema (check the Changelog to find out) you need to restart Jetty for the changes to take effect:

    sudo service jetty restart
  7. If there have been changes in the database schema (check the Changelog to find out) you need to upgrade your database schema.

  8. If new configuration options have been introduced (check the Changelog to find out) then check whether you need to change them from their default values. See Configuration Options for details.

  9. Rebuild your search index by running the ckan search-index rebuild command:

    paster search-index rebuild -r --config=/etc/ckan/default/development.ini

    See search-index: Rebuild search index for details of the ckan search-index rebuild command.

  10. Finally, restart your web server. For example if you have deployed CKAN using the Apache web server on Ubuntu linux, run this command:

    sudo service apache2 reload
  11. You’re done!

You should now be able to visit your CKAN website in your web browser and see that it’s running the new version of CKAN.