How To Install PyroCMS on an Ubuntu 14.04 VPS

pyrocms vpsPyroCMS is a lightweight CMS built with the very popular PHP framework CodeIgniter, simple enough for any developer to create custom modules and for any end user to understand how PyroCMS works.
The installation of PyroCMS on an Ubuntu VPS should take about five minutes if you follow the very easy steps described below.

This install guide assumes that Apache, PHP and MySQL are already installed and configured on your Ubuntu based virtual server.
At the time of writing this tutorial, the latest stable version available is PyroCMS 2.2.5 and it requires:

  •     Apache Web Server >= 2.0 compiled with mod_rewrite module;
  •     PHP >= 5.2 with the following PHP extensions enabled: GD Graphics Library version 2.0.x, mcrypt and cURL.
  •     MySQL >= 5.0 installed on your Linux virtual server.
  •     CodeIgniter 2.1.x, jQuery 1.6.x and Lex – these third-party packages are included in each PyroCMS release.

Download the latest stable version of PyroCMS available at to the server and extract the downloaded archive to the document root of your web server:

cd /tmp/
wget --no-check-certificate -O
unzip -d /var/www/html/
mv /var/www/html/pyrocms* /var/www/html/pyrocms

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

vi /etc/apache2/sites-available/pyrocms.conf

and add the following lines:

<VirtualHost *:80>
   DocumentRoot /var/www/html/pyrocms/
      <Directory /var/www/html/pyrocms/>
         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Order allow,deny
         allow from all
   ErrorLog /var/log/apache2/
   CustomLog /var/log/apache2/ common

Then, execute the following command on your virtual server:

ln -s /etc/apache2/sites-available/pyrocms.conf /etc/apache2/sites-enabled/pyrocms.conf

Locate the PHP configuration file using the following command:

php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini

Edit the ‘php.ini’ PHP configuration file and add/modify the following lines:

vi /etc/php5/cli/php.ini
magic_quotes_runtime = Off
date.timezone = US/Central

The ‘mcrypt.ini’ file in ‘/etc/php5/conf.d’ needs to be copied or sym-linked to ‘/etc/php5/mods-available’:

cd /etc/php5/mods-available
sudo ln -s ../conf.d/
sudo php5enmod mcrypt

Activate the mod_rewrite module using:

sudo a2enmod rewrite

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

service apache2 restart

Make the document root and the PyroCMS files and directories in it writable by the Apache server which is running as user ‘www-data’ and group ‘www-data’ by executing the following command:

chown www-data:www-data -R /var/www/html/pyrocms/

Create a new MySQL database for PyroCMS using the following commands:

mysql -u root -p
mysql> CREATE DATABASE pyrodb;
mysql> GRANT ALL PRIVILEGES ON pyrodb.* TO 'pyrouser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> quit

Open using a web browser and follow the easy instructions.

That is it. The pyrocms installation is now complete.

You can log in to the PyroCMS administrator back-end using administrator login credentials and start using it.

pyrocms back-end

For security reasons, it is recommended to delete the install directory (‘/var/www/html/pyrocms/installer’) once you are done with the installation process.

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 PyroCMS 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

To prove you are human please solve the following *