About Features Downloads Getting Started Documentation Events Support GitHub

Site Tools


VuFind Migration Notes

This page provides notes on upgrading to the latest VuFind release from earlier versions.

Notes on upgrading to the latest VuFind 1.x can be found on the legacy migration notes page.

Migrating from VuFind 2.x or Newer to the Latest Release

Upgrading from VuFind 2.x or newer is relatively easy, assuming that you isolate all of your changes to the local settings directory, custom module and local theme.

:!: Note that if you have made customizations to your Solr schema or configuration, these changes will need to be reapplied manually.

:!: Always make a backup before upgrading, just to be on the safe side!!


Starting with VuFind 2.1, after unpacking the new VuFind, you should follow these steps to be sure your database and configurations are fully updated:

  1. Unpack the new version of VuFind on top of the old version. This will most commonly involve simply downloading the new version, but if you are using Git for version control, it can also be achieved by checking out or merging a different version tag.
    1. :!: If you are simply downloading the new version rather than using Git, it is safer to delete non-customized files before unpacking, to ensure that obsolete files do not remain as part of your installation – this is particularly important for the solr/vendor directory.
  2. If you are installing from Git rather than a downloaded archive, run “composer install” to update dependencies.
  3. Make sure that the config/vufind subdirectory of your local settings directory may be written by the web server and that autoConfigure is turned on in the [System] section of config.ini.
  4. Empty out the cache subdirectory of your local settings directory to be sure no incompatible settings are cached.
  5. Visit http://your-server/vufind/Upgrade/Home to run the automatic upgrade process. You will be prompted to enter the version number of the VuFind release you are upgrading from, and you may be asked to provide root database credentials to update its structure.
  6. Review the auto-upgraded configurations; if necessary, you can restore your previous configurations from backups generated by the upgrade process.
  7. Disable web server write access to the config/vufind subdirectory and turn off autoConfigure in config.ini for security.

:!: It is also strongly recommended that you check the changelog for notes on backward-incompatible changes that might affect e.g. your local customizations.

:!: It is usually a good idea to reindex your records in Solr after an upgrade, assuming you are running a Solr-based VuFind instance.

:!: If you have to maintain a significant number of custom templates, this blog post offers a strategy for automatically updating them with the help of Git.

:!: If you upgrade by reinstalling the DEB package instead of simply unpacking a .zip or .tar.gz archive, be aware that some defaults (particularly in local/httpd-vufind.conf) may be restored. As with other configuration overwriting, backup files should exist that may be easily compared/restored if this causes problems.

:!: Make sure that your system meets the requirements of the new version.

Special Notes on Upgrading with PostgreSQL

VuFind's web-based upgrade script will automatically fix your MySQL database structure for you to account for changes. However, for PostgreSQL, database migrations must be applied manually. Look in the module/VuFind/sql/migrations/pgsql directory to see if there is a migration folder for the new release. If so, the scripts in the migration folder should be applied in numeric order from the command line. You can do this with the command:

psql -U [your-vufind-username] -d [your-vufind-database-name] -a -f [path/to/migration.sql]

Special Notes on Upgrading from 2.x to 3.x

VuFind 2.x uses Solr 4 while VuFind 3.x uses Solr 5. If you are upgrading from 2.x to 3.x, you will notice some important changes: the solr directory contents will be structured differently, and the VuFind start/stop script will be called “solr.sh/solr.bat” instead of “vufind.sh/vufind.bat”.

Before unpacking the 3.x distribution on top of 2.x, it is recommended that you follow these steps:

- Delete vufind.sh/vufind.bat to prevent confusion. If you wish to retain these script names for your existing workflows, create simple wrapper scripts around solr.sh/solr.bat - Rename your existing solr directory to solr_old (this way you can easily revert if you have problems with the upgrade; after successfully reindexing your data and testing your upgraded VuFind, you can remove the solr_old directory).

Migrating from VuFind 1.x

:!: You should not upgrade directly from VuFind 1.x to VuFind 3.0 or newer. If you still have a 1.x instance, it is recommended that you upgrade from VuFind 1.x to the latest VuFind 2.x release, and then from there to the newest version.

Although you have the highest chances of a smooth upgrade process if you migrate from the most recent 1.x release of VuFind, you can skip intermediate steps if you want to – VuFind 2's upgrade process should be able to handle migration from most versions in the 1.x series.

  • Make sure that VuFind 1 is running – the upgrade script will need access to your Solr index.
  • Upgrade Java to 1.7 if needed.
  • Install a copy of VuFind 2 according to the installation notes. Make sure you do not install VuFind 2 into the same directory as VuFind 1. (If you want VuFind 2 to live in the current location of VuFind 1, just move VuFind 1 out of the way prior to installation).
  • Instead of navigating to http://your-server/vufind/Install/Home to configure VuFind, use http://your-server/vufind/Upgrade/Home and follow the on-screen prompts.
  • The automatic upgrade will handle most of your configurations, but several things will require manual attention:
    • Custom code - most code changes can now be isolated to a custom module.
    • Custom themes - 2.0 themes use PHP templates instead of Smarty and have a different directory structure – see customizing the user interface. Note that the smarty2php tool may help automate some of the template upgrading, though it will still require significant manual effort.
    • Solr schema/configuration changes
  • Shut down VuFind 1, reindex your records into VuFind 2, and start VuFind 2's Solr instance.
  • For security, disable web server write access to the config/vufind subdirectory of your local settings directory and turn off autoConfigure in the [System] section of config.ini.

Obviously, it is strongly recommended that you prepare your VuFind 2.x upgrade on a test server prior to doing this in production – porting old customizations is not a trivial process.

Remember that help is available at the support page if you have questions or problems.

installation/migration_notes.txt · Last modified: 2018/02/05 07:34 by demiankatz