Skip to main content

Web photo gallery application on your server – Piwigo tutorial you are looking for making a fancy yet simple Web photo gallery to display your weddings pictures, share your last trip photos with your family or as a demo of your work, a comparison of photo galleries to be installed on a server to published your albums can be actually found on Wikipedia.

My favorite one is Piwigo, it’s an open source (Under GPL licence) photo software for the web, written in PHP and requiring MySQL.

The community and project are very active and several plugins are available to make the full experience even better.

To give you an idea you can browse their demo.

Let’s see how to install it on a working server with PHP and MySQL installed. (If not done yet, you can refer to my previous guide on how to install a LAMP server)


To separate your web gallery, you should create a dedicated folder. In root user (su), type:

and then download the latest netinstall apps:

Now you need to change the owner of this folder to ensure apache user has write access and provide sufficient privileges. In root, type:

And then simply go to http://yourIP/mygallery/piwigo-netinstall.php
to continue the installation. You will need a MySQL database to proceed the installation. If you don’t have one, I suggest you to use PHPMyAdmin to do so and follow the example of configuration for a database.

Virtualhost configuration

If like me, you prefer to have a sub-domain (Or a different domain name than your principle one) pointing directly to your Piwigo instance, you will need to create a dedicated Virtualhost file.

The fastest way might be to reuse some of your existing Vhost file by duplicating it and modifying accordingly to your needs.

Or you can reuse mine and adapt it.

In root, type:

and here is how mine looks like:

Once modified, save it (CTRL+X, then Yes) and reload your apache configuration:

(In root)

You should now have a working web gallery with its own subdomain.

If you use another web photo gallery, which one are you using and why?

PhpMyAdmin – Administrate your MySQL database through a Web Interface

If you want to administrate your MySQL database, I strongly recommend you to use PHPMyAdmin. It is a Web interface that will allow you to run the most frequently used command through a very user friendly interface.


With that, you will not need to know anything about SQL language, you can just use the tool to do actions such as to create a database, export, import, backup, create user, gave additional permissions to some users, etc….


Obviously, before to install PHPMyAdmin to manage your MySQL databases, you need to install first MySQL Server:

Then install PHPMyAdmin by running:

It will ask you if you want to reconfigure your webserver. Select apache (with [SPACE] and then validate)

The next question will be to know if you want to configure database for phpmyadmin with dbconfig-common? ==> Not needed.

And that’s all.

You should have access to phpmyadmin from Your login is root and your password is the one you set during the installation of MySQL.

Example of configuration

Now let’s say you want to create a Database and a dedicated user to install WordPress on your computer.

1) Click on

2) In the “Create new database” field, set your DB name and click on “Create” button.


You should be informed that the database has been create


3) Now select “Check Privileges” at the right of the table you just created


4) And select “Add a new User”


5) Fulfill the needed information (User name, Host and password)


And select “Grant all privileges on database “myblog” to give this user full access to your database.

If you want to tune the access, simply select the permissions you want to give the user, from the list below.

6) Press to finish.

And now you are all set to configure your wordpress instance !


I know there are others alternatives to phpmyadmin, if you prefer some others, please share them in the comments for me to check them out.