How to install Piwigo 2.9.3 on Ubuntu 18.04

To install Piwigo 2.9.3 on Ubuntu 18.04

Piwigo is an open source PHP based content management system used for creating gallery focused websites. It supports multiple media formats, integrated blogs, and custom pages. Piwigo is an ideal CMS tool for photographers, designers, filmmakers, and musicians.

Prerequisites

To install LAMP(Apache, MariaDB, php7)

In MariaDB (create database and user and give privileges to that user )

Php installation with required following modules

add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd php7.0-mbstring php7.0  php7.0-common  php7.0-xmlrpc php7.0-soap  php7.0-xml 
php7.0-intl  php7.0-cli  php7.0-ldap php7.0-zip php7.0-readline php7.0-imap php7.0-tidy php7.0-recode php7.0-sq php7.0-intl

Download a Piwigo package from the terminal using wget command

root@linuxhelp1:~# wget https://piwigo.org/download/dlcounter.php?code=latest
--2018-06-12 21:54:06--  https://piwigo.org/download/dlcounter.php?code=latest
Resolving piwigo.org (piwigo.org)... 87.98.147.22
Connecting to piwigo.org (piwigo.org)|87.98.147.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7818425 (7.5M) [application/zip]
Saving to: ‘ dlcounter.php?code=latest’ 

dlcounter.php?code=late 100%[==============================> ]   7.46M  35.6KB/s    in 87s    

2018-06-12 21:55:35 (87.9 KB/s) - ‘ dlcounter.php?code=latest’  saved [7818425/7818425]

The downloaded package is a zip file, so unzip the package as follows

root@linuxhelp1:~# unzip dlcounter.php?code=latest
Archive:  dlcounter.php?code=latest
   creating: piwigo/
  inflating: piwigo/.gitignore      
   creating: piwigo/_data/
 extracting: piwigo/_data/dummy.txt 
  inflating: piwigo/about.php       
  inflating: piwigo/action.php
.
.
  inflating: piwigo/tools/replace_version.pl 
  inflating: piwigo/tools/translation_analysis.php 
  inflating: piwigo/tools/triggers_list.php 
  inflating: piwigo/tools/ws.htm    
  inflating: piwigo/upgrade.php     
  inflating: piwigo/upgrade_feed.php 
   creating: piwigo/upload/
  inflating: piwigo/ws.php

Move the extracted file into the HTML location

root@linuxhelp1:~# mv piwigo /var/www/

Switch to the following directory

root@linuxhelp1:~# cd /var/www/

Change the ownership and permission of the file as follows

root@linuxhelp1:/var/www# chown -R www-data.www-data piwigo
root@linuxhelp1:/var/www# chmod -R 775 piwigo

Create a new virtual host configuration for accessing the Piwigo

root@linuxhelp1:/var/www# vim /etc/apache2/sites-available/piwigo.conf
< VirtualHost *:80> 
ServerName www.linuxhelp1.com
DocumentRoot /var/www/piwigo/

< Directory /var/www/piwigo/> 
AllowOverride All
allow from all
< /Directory> 

< /VirtualHost> 

Enable the site access

root@linuxhelp1:/var/www# a2ensite piwigo.conf
Enabling site piwigo.
To activate the new configuration, you need to run:
  systemctl reload apache2

Disable the default site access

root@linuxhelp1:/var/www# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the rewrite module

root@linuxhelp1:/var/www# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the apache2 service

root@linuxhelp1:/var/www# systemctl restart apache2

Now you can proceed the further installation and configuration from the browser by navigating to the following URL of http://local IP (or) domain name

Configure the Database setup and Admin user detail

Now the installation setup is complete to access Piwigo Photo gallery

You can see the Piwigo photo gallery as shown here

You can see the Admin dashboard of Piwigo as follows

with this, the method to install Piwigo 2.9.3 on Ubuntu 18.04 comes to an end.

FAQ
Q
Is Piwigo opensource?
A
Yes, Piwigo is free and opensource software.
Q
Can I post photos on Piwigo?
A
You can post photos but No pornography, no nudity without private access, no illegal activities that would violate laws in the country you live in (such as explicit violence or historical revisionism).
Q
What happens at the end of the trial period on Piwigo?
A
At the end of the trial period, your account is suspended and kept for 3 months so that you can subscribe. As long as you do not decide to subscribe, no payment is required.
Q
What are the prerequisites of Piwigo?
A
Any modern browser will do the job. Compatible with Windows, Mac, and Linux. Minimum screen resolution 1024x768 pixels.
Q
Can I use my own domain name for Piwigo setup?
A
Yes, or a subdomain only. Open a support request and Piwigo will guide you through the process.