We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How To Install Pligg CMS 2.0.x on an Ubuntu 12.04 VPS

PostedJanuary 24, 2014 17.6k views CMS Ubuntu

Status: Deprecated

This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:

Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.

See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.

About Pligg CMS

This tutorial will show how to install and configure Pligg CMS 2.0.x on an Ubuntu Server 12.04.x. Pligg CMS is an open source content management system that allows you to create an online community where users can submit articles, vote on them, and leave comments.

Pligg CMS was designed from the ground up as a way for a large number of contributors to submit and moderate content. Registered users, as well as visitors in some circumstances, are in control of the website's content. Pligg CMS 2.0.x requires Linux, Apache, MySQL 5+, and PHP 5+.

The following is a step-by-step guide to installing and configure pligg CMS 2.0.x on an Ubuntu Server 12.04

Step 1 - Enable LAMP Server

First, Login to your VPS server using the ssh command

ssh username@ip_or_hostname

Before installing Pligg CMS 2.0.x, make sure you have installed LAMP server ( Linux, Apache, Mysql, PHP) on your virtual private server. If don't have the LAMP server, you can install it by typing the following command in terminal:

sudo apt-get install lamp-server^

Or, you can read the tutorial on how to install LAMP on an Ubuntu Server here.

Step 2 - Download Pligg CMS 2.0.x

You can download Pligg CMS 2.0.x straight from githup with the wget command:

cd /var/www/
sudo wget https://github.com/Pligg/pligg-cms/releases/download/2.0.1/2.0.1.zip

Step 3 - Create the Pligg CMS Database and User

Now you need to switch gears for a moment and create a new MySQL directory for Pligg CMS.
Go ahead and log into the MySQL Shell with the following command:

mysql -u root -p

Login using your MySQL root password, and then you need to create a pligg CMS database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon (;)

Create database for pligg CMS. For my example, I'll create the db name "dbpligg"


Create the new user. You can replace the database, name, and password with whatever you prefer:

CREATE USER pligguser@localhost;

Now, set password for username "pligguser"

SET PASSWORD FOR pligguser@localhost= PASSWORD("pL!g9p45sw0rd");

Finish up by granting all privileges to the new user ("pligguser") with the following command:

GRANT ALL PRIVILEGES ON dbpligg.* TO pligguser@localhost IDENTIFIED BY 'pL!g9p45sw0rd';

Then refresh MySQL and sign out from MySQL shell



Step 4 - Setup the Pligg CMS 2.0.x Configuration

If you installing Pligg CMS 2.0.x on a fresh LAMP VPS, you need to rename/change file index.html to other name file. In example: I'll change file index.html to index.html.origin

sudo mv /var/www/index.html /var/www/index.html.origin

Extract archive pligg 2.0.x using unzip command:

sudo unzip /var/www/2.0.1.zip -d /var/www/

Rename the /favicon.ico.default to /favicon.ico

sudo mv /var/www/favicon.ico.default /var/www/favicon.ico

Rename the /settings.php.default to /settings.php

sudo mv /var/www/settings.php.default /var/www/settings.php

Rename the /languages/langenglish.conf.default file to langenglish.conf.

sudo mv /var/www/languages/lang_english.conf.default /var/www/languages/lang_english.conf

Note: Apply to any other language file that you might use that are located in the /languages directory.

Rename the /libs/dbconnect.php.default file to dbconnect.php

sudo mv /var/www/libs/dbconnect.php.default /var/www/libs/dbconnect.php

Rename the directory /logs.default to /logs

sudo mv /var/www/logs.default /logs

Change permision to the following directories and files: admin/backup/, avatars/groupsuploaded/, avatars/useruploaded/, cache/, languages/) to 777
cd /var/www

sudo chmod 777 admin/backup/ avatars/groups_uploaded/ avatars/user_uploaded/ cache/ languages/

Change permision the following file (/libs/dbconnect.php, /settings.php) to 666

sudo chmod 666 libs/dbconnect.php settings.php

Edit file settings.php, change $mybaseurl = 'http://localhost'; to $mybaseurl = 'http://your-domain.com';

sudo nano /var/www/settings.php

Give ownership of the file and directory to the apache user.

sudo chown -R www-data:www-data /var/www/*
sudo usermod -a -G www-data username

Step 5 - Finish Installation, PliggCMS from Web Browser

Now from PC or laptop, open the your favorite web browser and navigate to: http://ip_or_domain/install/install.php. You can see the following screenshot is a step-by-step installation of Pligg CMS from web browser.

Select language

Click next step if you have already completed this in step 4

Enter your MySQL database settings

Checking database connections

Enter your admin account details

Congratulations, Pligg CMS Installation is Complete!

Login again to your VPS using the ssh command, then change permisision file "/libs/dbconnect.php" to 644

sudo chmod 644 /var/www/libs/dbconnect.php

Delete pligg installation folder with following command:

sudo rm -rf /var/www/install

Pligg CMS frontpage

Now, Login to the admin area (yourdomain.com/admin/admin_index.php) using the username and password information you entered from the previous step.

Once you log in you should be presented with more information about how to use Pligg CMS.

Submitted by: Linux Scoop


Creative Commons License