Afterster edited this page Dec 8, 2015 · 3 revisions


Every attempt is made to make upgrading your Ampache installation as painless as possible. Although we do everything we can to prevent data loss during an upgrade it is never a bad idea to backup your database before performing an upgrade. Below is a simple command line way to backup your MySQL database. Whenever you upgrade Ampache it is recommend that you run a catalog Verify so that any improvements/changes to the tag reading process are applied to your local collection. The catalog verify is not forced during the upgrade due to the length of time it can take.

mysqldump -u <USERNAME> -p <AMPACHEDB> --add-drop-table --allow-keywords > mybackup.sql

Basic Instructions

  • Move your Old Install Directory out of the way

mv ampache ampache.old

  • Extract the new version

tar -xzf current.tar.gz

  • Copy your config file from the old install to the new directory

cp ampache.old/config/ampache.cfg.php ampache/config/

  • Since Ampache 3.8.1, don't forget to update Composer dependencies with composer install --prefer-source --no-interaction

  • Attempt to login as normal, Ampache will prompt you for any database upgrades which must be performed

Maintenance mode

If you attempt to run migration or custom scripts, it's good practice to put your website in maintenance mode to avoid users doing mistakes during that time.

To put Ampache in maintenance mode, simply create a new .maintenance file in Ampache root directory. An example redirecting a page hosted in ampache.org is provided under .maintenance.example file. When creating your custom message, don't forget to add exit; at the end to stop the script going further.

Old versions

Migrating from Ampache 3.4.x --> 3.5

If Ampache reports that your config file is 'unreadable' after upgrading open your config file and remove all configuration options relating to RSS Feeds, these options should be at the bottom. This is due to a change in PHP versions which is often done at the same time as an Ampache upgrade.

Migrating from Ampache 3.3.x --> 3.4

Ampache 3.4 Introduces a new config format. Still follow the basic instructions however when attempting to login Ampache will redirect you to a different update page telling you that your ampache.cfg.php is out of date and must be updated. Run the command line script as instructed before continuing.