The upgrade process should be very safe. But just in case, it's a very good idea for you to make a backup. So before you perform this upgrade you should backup the database just in case. If something goes wrong you can always restore the database and try again. If you've made modifications to your copy of the Gallery 2 code, you should back up your changes also in case the update overwrites some of them.
Browse to your Gallery2 installation in your web browser, log in as an administrator, click the "Site Admin" link then click the "Maintenance" link. You'll be presented with a list of maintenance tasks. Next to the task marked System Information click the run now link then look for a line marked Gallery version.
There are three ways to upgrade:
Note on files in modules/ and themes/ (other than modules/core): If you're using plugins from the experimental repository of downloadable plugins, you should upgrade it through downloadable plugins as well. The version included in 2.2.x is probably incompatible with or older than the version of the plugin that you're already using.
First determine your exact Gallery 2.2.x version.
This file contains all the changed files. Copy this file to your webserver and unpack it in your gallery2 directory. Once unpacked, you will have the following files:
README.txt | Instructions (that tell you to come to this page) |
changed-files-core.zip | A zipfile containing all the changed files in the Gallery 2 core |
changed-files-webdav.zip, changed-files-comment.zip, ... |
A zipfile containing all the changed files in the various modules and themes |
Remember that when you're done with the update, you should delete these files! Leaving them around won't hurt you, and won't be a security risk but they don't help either. Also remember that you don't need all these files. You only need to extract the files for the modules / themes that you have installed.
Inside the zipfile are more zipfiles with names like "changed-files-xxx.zip". Each of these contains the changes for a specific module or theme. Simply unzip these files inside your Gallery 2 directory and then run the upgrade wizard and follow the instructions. This is reasonably fast because there are very few changed files however if you've modified any of the files that are replaced, your modifications will be lost. On Linux/Unix you'd do this:
cd gallery2 unzip changed-files-core.zip unzip changed-files-webdav.zip (if you use the webdav module) ...
If you don't have command line access to the server where Gallery runs, you need to extract the zipfiles on your computer and then upload the extracted files e.g. via FTP to your server.
Note: If you're used the preinstaller to install Gallery 2, you'll need first need to open your Gallery 2 folder for changes. See: How to make the Gallery 2 folder writable?
Download a complete new copy of Gallery 2.2.6 and simply unpack it on top of your existing Gallery 2 install and then run the upgrader. This is a simple and thorough but slow method. Also, any modifications that you've made to Gallery 2 will be lost when you replace the files, with the exception of template changes made in local directories.
Note: Gallery 2 packages come in 4 flavors (typical, minimal, full, and developer). You should try to make sure you download the same package as you did before.
If you have Gallery 2 installed from Subversion you can simply run:
svn update
which will get you the latest code from the area you originally checked out. If you checked out BRANCH_2_2 then this will retrieve the latest 2.2.x version; if you checked out the trunk this will get the latest development code.
Once your files have been updated, open up your Gallery 2 in your web browser and it will take you right to the upgrader automatically. Follow the instructions there.
On step 2 of the upgrader, the Gallery file integrity check should show Success. If there are missing/deleted/modified files listed here, you should make sure that they are files that you yourself have modified in your own copy. If it reports over a hundred missing files from the modules/core/test directory then verify that you did not accidentally install the developer zip of changed files over an install that was originally from the minimal, typical or full version. If you did that's ok! Just go back and get the right zip file and try again.
Note: If you're updating from 2.0.1 or earlier you may get an integrity error warning that the docs/LOCALIZING file is obsolete. You can delete this file from your installation safely.
Upon successful completion it will drop you back into your Gallery 2 install with the latest version and you're done.