Move piwigo galleries to a new hosting site

119 Likes Comment
Piwigo - a tool to manage photo gallery

If you’re a professional photographer, and you know how to populate your works into a website. I guess that you’ll choose a photo gallery platform, called Piwigo.

It’s not only easy to use this platform but also a professor in manage photo collection : https://piwigo.org/features

Today I’ll tell you how to silently move piwigo galleries to new hosting/server ( I recommend you a cheap VPS ).

  1. Backup your data: database & and piwigo site
mysqldump -udatabase_username -p"database_user_password" database_name > /home/username/backupdata/database-exported-file.sql

Remember backup all files and folders in piwigo site. Note that: photos will be stored in upload/ and _data/ folders in your site.

2. Create a new database connection in new hosting/server.

Copy piwigo backup data and database to new home.

modify the configuration in file : local/config/database.inc.php

3. Tips: the rewrite rules could be defined in file: local/config/config.inc.php

// +-----------------------------------------------------------------------+
// |                                 urls                                  |
// +-----------------------------------------------------------------------+

// gallery_url : you can set a specific URL for the home page of your
// gallery. This is for very specific use and you don't need to change this
// setting when move your gallery to a new directory or a new domain name.
$conf['gallery_url'] = null;

// question_mark_in_urls : the generated urls contain a ? sign. This can be
// changed to false only if the server translates PATH_INFO variable
// (depends on the server AcceptPathInfo directive configuration)
$conf['question_mark_in_urls'] = true;

// php_extension_in_urls : if true, the urls generated for picture and
// category will not contain the .php extension. This will work only if
// .htaccess defines Options +MultiViews parameter or url rewriting rules
// are active.
$conf['php_extension_in_urls'] = true;

// category_url_style : one of 'id' (default) or 'id-name'. 'id-name'
// means that an simplified ascii represntation of the category name will
// appear in the url
$conf['category_url_style'] = 'id';

// picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file'
// or 'file' mean that the file name (without extension will appear in the
// url). Note that one aditionnal sql query will occur if 'file' is choosen.
// Note that you might experience navigation issues if you choose 'file'
// and your file names are not unique
$conf['picture_url_style'] = 'id';

// tag_url_style : one of 'id-tag' (default), 'id' or 'tag'.
// Note that if you choose 'tag' and the url (ascii) representation of your
// tags is not unique, all tags with the same url representation will be shown
$conf['tag_url_style'] = 'id-tag';

4. If you met a problem with this software, let’s tell me. I’ll clear your question marks!

5. Don’t forget comment and share this useful post. Thanks

You might like

Avatar

About the Author: Toc Xoan

Leave a Reply

Your email address will not be published. Required fields are marked *