VirtueMart 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 http://www.virtuemart.net/downloads to the server and extract the downloaded archive using the following commands:
cd /root wget http://dev.virtuemart.net/attachments/download/699/VirtueMart2.6.0_Joomla_2.5.19-Stable-Full_Package.zip unzip VirtueMart2.6.0_Joomla_2.5.19-Stable-Full_Package.zip -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> FLUSH PRIVILEGES; 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:
then, add the following lines at the end:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/virtuemart/ ServerName www.yourdomain.com <Directory /var/www/html/virtuemart/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog logs/yourdomain.com-error_log CustomLog logs/yourdomain.com-access_log common </VirtualHost>
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 post_max_size=128M upload_max_filesize=128M
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 http://your-domain.com/ 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.