Piwigo – Create Your Own Photo Gallery Website

Piwigo is an open source project which allows you to create your own photo gallery on the web and upload photos and create new albums. The platform includes some powerful features built-in, such as albums, tags, watermark, geolocation, calendars, system notifications, access control levels, themes and statistics.

Piwigo has a huge amount of available plugins (over 200) and a great collection of themes. It is also translated in more than 50 languages. Its core functions are written in PHP programming language and requires a RDBMS database backend, such as MySQL database.

Piwigo Photo Gallery

Piwigo Photo Gallery

This fact makes it easy to deploy Piwigo on top of a LAMP (Linux, Apache, MySQL and PHP) stack installed on your own server, VPS or on shared hosted environments.

An online demo is available for you to try before installing Piwigo on CentOS system.

Demo URL: http://piwigo.org/demo/


  1. A dedicated VPS with a registered domain name
  2. A CentOS 7 Server with Minimal Install
  3. LAMP stack installed in CentOS 7

Piwigo is an open source project which can be deployed on a VPS server of your choice.

You can get a 2GB RAM VPS from Linode for $10, but it’s unmanaged. If you want a Managed VPS, then use our new BlueHost Promotion Offer, you will get upto 40% OFF on hosting with one Free Domain for Life. If you get a Managed VPS, they will probably install Piwigo for you.

In this guide we’ll learn how to install and configure Piwigo image gallery software on top of a LAMP stack in a CentOS 7 VPS server.

Setting Up Pre-requirements for Piwigo

1. After you’ve installed LAMP stack on your VPS by following the guide in the article description, make sure you also install the below PHP extensions required by Piwigo to properly run on your server.

# yum install php php-xml php-mbstring php-gd

2. Next, install the following command line utilities on your VPS server in order to download and extract Piwigo archive sources in your system.

# yum install unzip zip wget 

3. Next, log in to MySQL database and execute the below command in order to create Piwigo database and the user which will be used to manage the database. Replace the database name and credentials used in this tutorial with your own settings.

# mysql -u root -p
MariaDB [(none)]> create database piwigo;
MariaDB [(none)]>grant all privileges on piwigo.* to 'piwigouser'@'localhost' identified by 'pass123';
MariaDB [(none)]>flush privileges;
MariaDB [(none)]>exit

4. Next, open end edit PHP configuration file and set the correct timezone settings for your server. Use PHP docs to get the timezone settings list.

# nano /etc/php.ini

Locate and Insert the below line after [Date] statement.

date.timezone = Europe/Your_city
Set Timezone in PHP Configuration

Set Timezone in PHP Configuration

Save and close the file and restart Apache HTTP server to apply all changes, by issuing the below command.

# systemctl restart httpd

5. Next, completely disable SELinux in your CentOS system by executing the below commands. Use cat command to show Selinux configuration file.

# cat /etc/selinux/config 
# sed -i.backup 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config 
# cat /etc/selinux/config 
# setenforce 0
# getenforce
Disable SELinux in CentOS 7

Disable SELinux in CentOS 7

Install Piwigo in CentOS 7

6. On the next step, visit Piwigo official download page and grab the latest installer zip sources on your system using wget utility by issuing the below command. After download completes, extract Piwigo zip archive in your current working directory.

# wget http://piwigo.org/download/dlcounter.php?code=latest -O piwigo.zip
# ls 
# unzip piwigo.zip 
Download Piwigo Software

Download Piwigo Software

7. After you’ve extracted the zip archive, copy Piwigo sources files into your domain webroot path by issuing the below command. Afterwards, grant Apache account full privileges to webroot files and list the content of your web server document root path.

# cp -rf piwigo/* /var/www/html/
# chown -R apache:apache /var/www/html/
# ls -l /var/www/html/
Setting Up Piwigo Under Apache

Setting Up Piwigo Under Apache

8. Next, change the webroot file permissions for Piwigo installed files and grant _data directory full write permissions for other system users, by issuing the below commands.

# chmod -R 755 /var/www/html/
# chmod -R 777 /var/www/html/_data/
# ls -al /var/www/html/
Setting Permissions on Piwigo

Setting Permissions on Piwigo

9. Now, start the installation process of Piwigo. Open a browser and navigate to your server IP address or domain name.

On the first installation screen, select Piwigo language and insert MySQL database settings: host, user, password and table prefix. Also, add a Piwigo admin account with a strong password and the email address of the admin account. Finally, hit on Start installation button to install Piwigo.

Piwigo Installation Configuration

Piwigo Installation Configuration

10. After the installation has been completed, hit on Visit the gallery button in order to be redirected to Piwigo admin panel.

Piwigo Installation Completed

Piwigo Installation Completed

11. On the next screen, because no image has been uploaded to the server yet, hit on Start the Tour button in order to display the software guidance window and review all step required to upload your photos and use Piwigo image gallery.

Start Piwigo Tour

Start Piwigo Tour

Piwigo Admin Dashboard

Piwigo Admin Dashboard

That’s all! Now you can start creating image galleries and upload your image files to the server using one of the most flexible open source solutions to host your photos.

Piwigo Image Gallery

Piwigo Image Gallery

If you’re looking for someone to install Piwigo image gallery software, consider us, because we offer wide range of Linux services at fair minimum rates with 14-days free support via email. Request Installation Now.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

5 Responses

  1. Thommy M. says:

    Yepp, I followed the instruction to the point. Also finally found out that one has to use the database root user/passwd at the installation. Not the piwigo account created in the instructions. That made me a bit scared … However it installed.

    • Ravi Saive says:


      That’s great you finally installed Piwigo. If any help, feel free to post your queries here, we love to answer..

  2. Thommy M. says:


    I’ve followed your instructions on a Fedora 28, MariaDB, Apache and PHP server and I can access a test.php (phpinfo) from remote, but the Piwigo installation gives this error message “Cannot connect to server”.

    Any hints on where to start debugging?

  3. Stan says:

    Why do you disable SELinux? Is it so difficult to configure it?

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.