How to install Pligg CMS on Ubuntu 14.04

PliggPligg CMS is a free and open source Content Management System (CMS) written in PHP and using the popular open source MySQL database system for content storage. Pligg enables users to create an online community where anyone can submit articles, vote on them, and leave comments. Pligg CMS is incredibly easy to use and manage, and can easily help power social networks and other interactive communities. There are plenty of templates to choose from, along with a plethora of plugins and extensions. The software encourages visitors to register on your website so that they can submit their content and connect with other users. It is fairly easy to install Pligg CMS on an Ubuntu 14.04 VPS. The installation process should take about 5-10 minutes if you follow the very easy steps described below.

At the time of writing this tutorial, Pligg CMS 2.0.2 is the latest stable version available and it requires:

– Apache web server;
– PHP (version 5.3 or higher);
– MySQL(version 5.1 or higher) installed on your Linux VPS;

INSTRUCTIONS:

Log in to your VPS via SSH

ssh user@vps_IP

Update the system

[user]$ sudo apt-get update && sudo apt-get -y upgrade

Install MariaDB 10.0

To install MariaDB, run the following command:

[user]$ sudo apt-get install -y mariadb-server

Next, we need to create a database for our Pligg CMS installation:

[user]$ mysql -u root -p

MariaDB [(none)]> CREATE DATABASE pligg;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON pligg.* TO 'pligguser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Do not forget to replace ‘your-password’ with a strong password.

Install Apache2 web server

[user]$ sudo apt-get install apache2

Install PHP and required PHP modules

To install the latest stable version of PHP version 5. and all nessesary modules, run:

[user]$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd

Download and extract the latest version of Pligg CMS on your server:

[user]$ sudo cd /opt && wget https://github.com/Pligg/pligg-cms/releases/download/2.0.2/2.0.2.zip
[user]$ sudo unzip 2.0.2.zip
[user]$ sudo mv pligg-cms-master/ /var/www/html/pligg

All files have to be readable by the web server, so we need to set the proper ownership:

[user]$ sudo chown www-data:www-data -R /var/www/html/pligg

Now, before proceeding with the web installation we need to rename several files and directories:

[user]$ sudo mv settings.php.default settings.php
[user]$ sudo mv languages/lang_english.conf.default languages/lang_english.conf
[user]$ sudo mv logs.default/ logs
[user]$ sudo mv libs/dbconnect.php.default libs/dbconnect.php

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘pligg.conf’ on your virtual server:

[user]$ sudo touch /etc/apache2/sites-available/pligg.conf
[user]$ sudo ln -s /etc/apache2/sites-available/pligg.conf /etc/apache2/sites-enabled/pligg.conf
[user]$ sudo nano /etc/apache2/sites-available/pligg.conf

Then, add the following lines:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/pligg/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/pligg/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Restart the Apache web server for the changes to take effect:

[user]$ sudo service apache2 restart

Open your favorite web browser, navigate to http://your-domain.com/install/install.php and if you configured everything correctly the Pligg CMS installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.

After everything is completed, change the permissions of the ‘dbconnect.php’ file:

[user]$ sudo chmod 644 libs/dbconnect.php

And delete the installation directory.

[user]$ sudo rm -rf install/

That is it. The Pligg CMS installation is now complete.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Pligg CMS for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment