How to install VirtueMart with Joomla on a Linux VPS

virtuemart vpsVirtueMart is an easy to use open source e-commerce component for the Joomla CMS. It offers plenty of features to create and maintain a website store with an unlimited number of categories, products, orders etc.
This install guide assumes that Apache, MySQL and PHP are already installed and configured on your Linux virtual server.
At the time of writing this tutorial, VirtueMart 2.6.0 is the latest stable version available. VirtueMart 2.6.0 is compatible with Joomla 2.5 and it requires:

PHP >= 5.4 with the following PHP extensions enabled: JSON, MySQL, MySQLi, mbstring, XML (Expat) and Zlib. Also, the PHP safe mode setting needs to be off;
Apache Web Server >= 2.0 compiled with mod_rewrite module and ‘AllowOverride All’ directive set in order to use search engine friendly URLs;
MySQL >= 5.0.4 installed on your Linux virtual server (MySQL 5.5 or later is recommended).

Download VirtueMart 2.6.0 available at to the server and extract the downloaded archive using the following commands:

cd /root
unzip -d /root/virtuemart

Create a new MySQL database for VirtueMart on your server:

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

Create a new virtual host directive in Apache. For example, edit your Apache configuration file (/etc/httpd/conf/httpd.conf by default) and uncomment the following line:

#NameVirtualHost *:80

then, add the following lines at the end:

<VirtualHost *:80>
DocumentRoot /var/www/html/virtuemart/
<Directory /var/www/html/virtuemart/>
	Options FollowSymLinks
        AllowOverride All
ErrorLog logs/
CustomLog logs/ common

Locate the php configuration file using the following command:

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

Edit the ‘php.ini’ file and add/modify the following settings:

display_errors = Off
html_errors = Off
display_startup_errors = Off
log_errors = On
output_buffering = Off 

Restart the Apache web server for the changes to take effect. Move the VirtueMart installation files to the document root directory defined in the virtual host directive above and create an empty ‘configuration.php’ file:

mv /root/virtuemart/ /var/www/html/virtuemart
touch /var/www/html/virtuemart/configuration.php

On CentOS/Fedora based virtual server, execute the following command:

chown apache:apache -R /var/www/html/virtuemart/

On Ubuntu or any Debian based virtual server, execute:

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

Open in your popular web browser and follow the easy instructions.

For security reason, do not forget to delete the ‘/var/www/html/virtuemart/installation’ directory from your VirtueMart installation. That is it. The VirtueMart 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 VirtueMart shopping cart 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.

How to install and configure JBoss AS with Java and Apache2 as a reverse proxy
Install Fuel CMS on an Ubuntu 14.04 VPS with Nginx, PHP-FPM and MySQL
Tips and Tricks
How to create and edit files on a Linux VPS
There are currently no comments.