How to Move Gallery installation from One Server to Another?
Gallery is one of popular web based photo organizer, I was use this app for my Office Photo collection. I really love with this application, support mod rewrite, easy to customize and many more. After use it for a while I have some problem. I need move my server from Windows to Linux Server. So I follow this guide
Here’s a step by step guide:
- Backup your installation!
- Upgrade G2 on the old server to the same G2 version which you plan to install on the new server.
- Deactivate AND uninstall the url rewrite module if it is active because it will generate incorrect urls after your move.
- Backup G2 on your old host. Backup the database and the g2data folder.
- Copy the g2data folder and import the mysql database to your new host. You can skip copying the g2data/locks directory if you want.
- If you’re using MySQL and moving from a windows based server to a *nix (unix, linux, …) based server, you will have to change each database table name from lower case (e.g. g2_albumitem) to a case-sensitive name (in this example g2_AlbumItem). See script Image:CaseSensitiveTables.zip to automate this process a bit.
- Install the gallery2 code (extract gallery2.tar.gz/zip) on the new host. It should be the same G2 version as you last used on the old host (that’s why you did the upgrade in step 2.).
- Have your webhosting partner change the owner of the g2data dir recursively to the webserver user, unless php cgi + suexec is used. If you don’t understand this instruction, forward it directly to your webhosting partner. The webhost has to do this only once, I’m sure they will do it.
- Don’t copy the config.php from the old host to the new host unless you’re willing to hand edit it. It’s easier to just run the installer; browse to newhost/gallery/install/. Make sure you choose “reuse existing database tables” in the database step. Point the installer in the appropriate step to the g2data folder (which is now not empty). And finish the installer. If you choose to copy the config.php instead of running the installer you have to manually change:
- the g2data path
- galleryId (at the bottom of config.php)
- db name/user if needed
- Go to G2 Site Admin and change all paths if needed. imagemagick, zip, netpbm, … all modules that depend on external programs have to be tested and reconfigured. Make also sure that the mail function of G2 works on the new host.
This tips taken from original FAQ Gallery Website
Popularity: 6% [?]


















