Installing Joomla! and VirtueMart
Installing Joomla! and VirtueMart Official Page Project Documentation Download
ISBN 978-1-847196-74-3 Publisher Packt Publishing Author(s) Suhreed Sarkar
- 1 Pre-requisites for installation
- 2 Creating database for Joomla!
- 3 Brief installation process for Joomla!
- 4 Installation of VirtueMart
- 5 Additional References
- 6 Source
 Pre-requisites for installation
Before starting with the installation of Joomla! and VirtueMart, we must know about the system requirements and other pre-installation requirements. We must ensure that all minimum system requirements have been met and all preparatory works have been done beforehand. In this section, we are going to discuss the minimum system requirements, pre-installation tasks, and creating a development environment.
 System requirements
Joomla! runs on Linux, Apache, MySQL, and PHP or a LAMP environment. It is designed for and tested on LAMP. However, many Joomla! sites successfully run on Windows and IIS with PHP support.
The followings are the minimum system requirements for installation of Joomla! 1.5.x:
- Apache 1.3 or above
- PHP 4.3.x or above
- MySQL 3.23.x or above
Although these are minimum system requirements, you must also ensure that PHP is installed with MySQL, XML, and Zlib functionality enabled. These can be enabled from the php.ini configuration file. However, for Joomla! 1.5.x, Apache 2.0.x, MySQL 5.0.x, and PHP 5.x are recommended.
VirtueMart has no separate system requirements. All it needs is a working installation of Joomla! 1.0.x or Joomla! 1.5.x, and Apache and PHP compiled with support for HTTPS (OpenSSL) and CURL. The PHP Safe Mode should also be turned off.
At the client side, most current browser versions work fine. Internet Explorer (5.5+), Firefox, Opera 9+, Safari, and Konqueror work fine with VirtueMart. However, the browser should be configured to accept cookies.
 Setting a development environment
Whenever you are developing a web application, it is better to first develop and test it in development environment. Once you are satisfied with the results of your configurations and customizations, you can upload that to a production web server.
For the exercise of this tutorial, we are going to setup a development environment, and try all our codes and examples in this development environment. However, we will also learn how to do it on a live server.
We already know that Joomla! and VirtueMart run on a web environment where Apache, MySQL, and PHP need to be present. We can get all these by installing each application separately, or by installing one of the following packages:
- WAMP’: This package runs on Windows operating systems. It includes latest versions of Apache, MySQL, and PHP. You can download WAMP server’s latest version and its documents from http://www.wampserver.com.
- MAMP’: Similar to WAMP, this package includes Apache, MySQL, and PHP, but this runs on computers with Mac OS. You can get MAMP and its documentation from http://www.mamp.info.
- XAMPP’: This package contains Apache, MySQL, PHP, Perl, and more add-ons like PEAR, phpMyAdmin, and so on. XAMPP is available for multiple platforms including Linux, Windows, and Mac OSX. You can download an appropriate version of XAMPP and its documentation from http://www.apachefriends.org/en/xampp.html.
For the exercises in this tutorial, we are going to use WAMP. Setting up a development environment by installing WAMP server is discussed in Appendix B.
 Getting Joomla!
Joomla! is available for download, free of cost, from its web site http://www.joomla.org. You will see a download link to the latest version of Joomla!, both for 1.0.x and 1.5.x series. For this tutorial, we are using Joomla! 1.5.9. However, most of the procedures described in this tutorial will also work fine with the Joomla! 1.0.x series.
To download Joomla!, visit http://www.joomla.org. On the right side of the page, you will find a box like this:
Click on the DOWNLOAD JOOMLA logo. You will be redirected to the Joomla! download page. Here, you will see the following listing of download files for Joomla! 1.5.x and Joomla! 1.0.x:
Click on one of the list of packages, for example, ZIP beside 1.5.9 Full Package. The file will start downloading to your computer. Once you finish downloading the file, you can extract the file and see the contents of the folder. These files and folders need to be uploaded to your web server (local or remote).
 Getting VirtueMart
Like Joomla!, you can also get VirtueMart from its web site http://ww.virtuemart.net. Point your browser to this site and you will get a download link. Before downloading, you must know something about available packages. The following are the VirtueMart package types available for download:
- Complete Package for Joomla! 1.5: This package contains the VirtueMart component, modules, and plugins all in one. All of these will work on the Joomla! 1.5.x series. Once you download this package, you must extract the package to get the component, modules, and plugins installation packages separately. The component, modules, and plugins can be installed from Joomla!’s extension installer.
- Complete Package for Joomla! 1.0.x or Mambo: If you are running Joomla! 1.0.x, or a Mambo-based site, and want to use VirtueMart in that site, you need to download this package. This package contains installer packages for the component, modules, and plugins.
- Manual Installation Package for Joomla! 1.5: This package is good for upgrading an existing VirtueMart installation. If you are using an earlier version of VirtueMart with Joomla! 1.5.x, then download this package and extract the files. You will then need to upload all the files. It will start the upgrade wizard for VirtueMart in Joomla! 1.5.x.
- Manual installation Package for Joomla! 1.0.x or Mambo: You need to download this package if you are using Joomla! 1.0.x or Mambo, and want to upgrade from an earlier versions of VirtueMart. This upgrade will happen by uploading the files to Joomla! site, not from the extension installer.
- Language Pack: If you want to use more than one language, or another language other than English, you need to download the language pack for VirtueMart.
- Patch Package (1.1.1->1.1.2) for Joomla! 1.5: This package is for upgrading from VirtueMart 1.1.1 to VirtueMart 1.1.2 in the Joomla! 1.5.x series. This package needs to be extracted and uploaded to your Joomla! site. It will then start the VirtueMart upgrade wizard.
- Patch Package (1.1.1->1.1.2) for Joomla! 1.0.x or Mambo: This is similar to package above, but only works with Joomla! 1.0.x series and Mambo.
- VirtueMart e-commerce Bundle (with Joomla! 1.5.5): This is the Joomla! 1.5.5 package bundled with VirtueMart 1.1.2. If you need to start the e-commerce site from scratch, you may download this package and install Joomla! 1.5.5 from this. Once Joomla! 1.5.5 is installed, you will get VirtueMart 1.1.2 as well. You don’t need to install VirtueMart separately.
For our example, we will download Complete Package for Joomla 1.5. Once we have downloaded this package and unzipped it on our computer, we will find the following files:
- VirtueMart_1.1_Installation.pdf: This is an installation guide for VirtueMart. Read this guide for detail information on the VirtueMart installation.
- com_virtuemart_1.1.2.j15: This is main component package which can be installed through the extensions installer. We should first install this package.
We will find the following module files in the modules subfolder:
- mod_virtuemart_1.1.2.j15.zip: This is the main module for VirtueMart. It will display the products for the VirtueMart catalog. You must install and publish this module to show the products.
- mod_product_categories_1.1.2.j15.zip: This module displays the product categories. It is good for displaying product categories in the left or right sidebar, so that it acts like a menu.
- mod_productscroller_1.1.2.j15.zip: When installed and published, you will see scrolling products. You can configure how many products will be scrolling and how quickly they will scroll.
- mod_virtuemart_allinone_1.1.2.j15.zip: This module alone can display featured products, random products, top ten products, and latest products. These are shown in a separate tab.
- mod_virtuemart_cart_1.1.2.j15.zip: This module shows the contents of the cart. This mini cart contains a link to main cart page.
- mod_virtuemart_currencies_1.1.2.j15.zip: This module shows currency selector. You only need this module when you are using multiple currencies for your shop.
- mod_virtuemart_featureprod_1.1.2.j15.zip: This module only displays featured products. You can configure how many featured products will be displayed in this module.
- mod_virtuemart_latestprod_1.1.2.j15.zip: This module displays the latest products added to VirtueMart catalog. You can configure how many latest products will be displayed.
- mod_virtuemart_login_1.1.2.j15.zip: This module displays a login module for VirtueMart users. This module ensures that user registration and login work for both Joomla! and VirtueMart.
- mod_virtuemart_manufacturers_1.1.2.j15.zip: This module lists the manufacturers. Clicking on a particular manufacturer will show the products of that manufacturer.
- mod_virtuemart_randomprod_1.1.2.j15.zip: This module displays randomly selected products. You can configure how many random products will be displayed.
- mod_virtuemart_search_1.1.2.j15.zip: This is search module for VirtueMart. When you install and publish this module, visitors will be able to search the VirtueMart product catalog.
- mod_virtuemart_topten_1.1.2.j15.zip: This module displays the top-ten selling products. This is similar to the best seller module in other shopping carts.
There are two plugins in plugins subfolder:
- vmproductsnapshots_1.1.2.j15.zip: This plugin enables the administrator to add a product snapshot in the content items, such as in an article. The snapshot will show a product image, price, and a link to add to the cart.
- vmxsearch.plugin_1.1.2.j15.zip: This plugin enables search in the VirtueMart catalog. When this plugin is installed and enabled, Joomla!’s standard search can find the VirtueMart products as well. In that case, you don’t need to use VirtueMart’s search module.
 Uploading installation files to server
Once you have downloaded and extracted the installation files, you need to upload them to a web server before starting installation. If you are using a local web server for development, copy the files to your web server’s webroot. For example, we are using a local WAMP server and its webroot is set to
e:\www. Therefore, we will create a folder
e:\www\bdosnand copy the Joomla! installation files to this folder.
If you are using a remote web server, you need to use some FTP client like FileZilla. Connect to the FTP server, and upload the files to appropriate directory.
 Creating database for Joomla!
We have learned that we need a MySQL database server to install Joomla! Before proceeding to the actual installation of Joomla!, we need to create a database for Joomla!. We can do this by using a
mysqlcommand, or through a phpMyAdmin web interface. Let us create one database for our BdOSN site by using a phpMyAdmin interface at localhost. For this, point your browser to http://localhost/phpmyadmin, and you will get the following screen:
In the Create new database field, type the name of database, that is
bdosn, and select utf8_general_ci in the Collation drop-down list. Then click on the Create button. This will create a database named
bdosn. However, there will be no tables yet. We don’t need to create tables since; these will be created during Joomla! installation. What we need to know at this point is the database name and username for that database. As we are using
localhost, it will be root without any password. However, for a production environment, you need to know the database username and password exactly what is used there.
 Brief installation process for Joomla!
Let us start installation of Joomla! now. We are going to install Joomla! on our development environment, that is the localhost. Therefore, follow the steps below:
1. Open your browser and type http://localhost/bdosn in the address bar. This will take you to the Joomla! Installation wizard. First, you will see the Choose Language screen. Select a language for installation steps and click the Next button:
2. A Pre-installation check screen will be displayed. This screen has two sections. The first section shows you whether the system meets the requirements for installing the Joomla! version you are installing. The second section shows the recommended settings and actual settings found on the server. Any deviation from the recommended settings will be shown in red. If there is any item in red color in the first section, you cannot install Joomla!. However, items with red color in second section (Recommended Settings) will still allow you to install Joomla! successfully. You may change some PHP settings and recheck the setting by clicking the Check Again button. To proceed with installation, click the Next button:
4. The Database Settings screen will be displayed next. You need to provide database setting information in this page. It has two sections, the Basic Settings and Advanced Settings. In the Basic Settings section, you must provide the following information:
- Database Type: By default, mysql is selected. You can also use mysqli. For our database, select mysql.
- Host Name: This is the MySQL server’s host name. It is usually localhost. If you are using a remote server, this name may be different and can be obtained from the host provider.
- Username: This is the username for connecting to the database. The user should have permission to insert, update, and delete a record from the database. For our database, type root in this field.
- Password: This is the password for the above username. For our default installation of a WAMP server, root user’s password remains blank. Therefore, keep it blank. If you have changed that password, type that password in this field.
- Database Name: Type the name of database to be used for this Joomla! installation. We have created
bdosndatabase for this purpose, so type bdosn in this field:
The fields in Advanced Settings are not visible by default. Click on the Advanced Settings heading, the fields will then be visible.
Options in this section are:
- Delete existing tables: If you are using an old database and want to delete the existing tables, select this option.
- Backup old tables: If you are using an old database and want the backup of the existing tables, select this option.
- Table Prefix: Type the prefix you want for Joomla! tables. A prefix is useful when you are sharing the same database for multiple applications. This prefix identifies Joomla! tables. You can type any prefix in this box except bak_ which is used for backup tables in Joomla!. Default prefix jos_ is fine with most of the installation, and we will keep it so.
Once all of these settings are configured, click on the Next button to proceed with the installation.
5.The FTP Configuration screen will now be shown. If you want to use FTP for uploading files to Joomla! your web site, you need to configure the FTP settings in this screen. By default, this is disabled. To enable it, select Yes. Then type the FTP User name, FTP Password for that user, and FTP Root Path. In the Advanced Settings section, you can type FTP Host and FTP Port. You can also configure whether FTP Password will be saved or not. For our site, keep the defaults (selected No) and click on Next button:
6. Next, the Main Configuration screen will be shown. There are three sections including the Site Name, Confirm the Admin E-mail and Password, and Load Sample Data, restore or migrate backed-up content. In the Site Name box, type the name of your site. For example, “Bangladesh Open Source Network”. In the next section, type the administrator’s email account in Your E-mail text field, then type password for the administrator account in the Admin Password text field. Then confirm it by retyping the password in the Confirm Admin Password text field:
Joomla! comes with some sample data. Installing these sample data will help you understand how Joomla! works. You will get some predefined sections, categories, and articles. The articles, accompanied with Joomla! 1.5, will help you understand how to use it. For installing the default sample data, select Install ‘Default Sample Data’ and click on the Install Sample Data button. Remember that only selecting the option to install the default data and then going to next step will not install the sample data. You must click on the Install Sample Data button before proceeding to next step. For our site,we are installing sample data, so click on the Install Sample Data button. Within a few seconds, a Sample data installed successfully message will be displayed in place of the Install Sample Data button:
The remaining options in this section are for migrating content from an earlier version of Joomla! to Joomla! 1.5.x. For this to work, you should have the generated migration script in the old Joomla! site using com_migrator component. That migration script will be used here. You can browse to the migration script, specify the old table prefix, old site encoding, and click on Upload and Execute button. We are not migrating old data, therefore, click onthe Next button.
Before trying to upgrade your old Joomla! site, you must backup the site files and database. You’ll learn more about the use of the com_migrator component and database backup and restoration in Tutorial 10, Maintenance and Troubleshooting.
7.Finish screen will now be displayed. Here, you will see some warning about removing the installation directory. On the top of the right-hand side we will also see the Site and Admin buttons. By clicking on these, we can go to the web site or administration area. Also notice that the administrative username is admin, and you need it to login to administration panel. Let us click on the Site button now:
8. We will see a warning message (note the following screenshot). It advises us to remove the Joomla! installation directory named installation, which is located under Joomla! installation root. Keeping this directory invokes a security risk, because anyone can point to this directory from his or her browser and start the Joomla! installation again. Let us delete the entire directory e:\www\bdosn\installation. Now, point your browser to http://localhost/bdosn to look at our newly installed Joomla! site.
We can now see the default installation of Joomla! 1.5.9. As we have installed the sample data, the frontend of the site looks like the following:
You can now look into the administrative panel as well. Let us type http://localhost/bdosn/administrator in our browser’s location bar. It will take us to administration section login screen:
Now, type the administrative username admin and password that you assigned during installation. You may select the language too. Then, click the Login button. On successful login, you will see the Joomla! administration panel:
The Joomla! administration panel is the place from where we will configure our Joomla! site and manage its contents.
For a complete discussion onthe Joomla! administration panel and building a generic web site using Joomla!, please read the tutorial Building Websites with Joomla! 1.5 published by Packt.
 Installation of VirtueMart
We are now ready to install VirtueMart. Earlier, we discussed that VirtueMart is a component of Joomla!. Therefore, it will be installed as a component. If you have not downloaded the VirtueMart installation package yet, download that now from the URL provided earlier in this tutorial. Put the VirtueMart installation package on your desktop and then extract the zip file. You will see the following directory structure:VirtueMart
If you see all of the above files, you have downloaded the correct package. If you don’t see the above, go to http://www.virtuemart.net and download Complete Package for Joomla! 1.5.
When packages are ready, login to the Joomla! administration panel. Once you are in the Joomla! administration panel, go to Extensions | Install/Uninstall. In the Extension Manager screen, click on the Browse button in the Package File field. Locate the com_virtuemart_1.1.2.j15.zip file on your desktop, select it, and click open. Then click the Upload File & Install button. On successful installation of the component, you will see the following screen:
The screen will inform you that VirtueMart has been successfully installed. You can now go to the store by clicking on the Go directly to the shop>> button. You can also install sample data for the VirtueMart store by clicking on the Install SAMPLE DATA>> button. Installed sample data will be published and browsing that data will help us to understand how VirtueMart works. However, you can delete this data anytime you want to. We will be discussing how to delete the sample data later in this tutorial.
Let us install the sample data by clicking on the Install SAMPLE DATA button. A warning message will be displayed asking that the sample data installation not be disturbed. Once the sample data installation is complete, we will get the following screen, the VirtueMart Administration panel:
We have just installed the component. However, there are some modules and plugins in the package. Let us install all these modules and plugins in a similar way. Go to Extensions | Install/Uninstall and select the files from your desktop. Click open and then click the Upload & Install button. Repeat this for all module files (inside modules subfolder and starting with mod_) and plugins files in plugins subfolder. For each successful installation, you will see a message like the following screenshot:
If you are trying to install VirtueMart packages for Joomla! 1.0.x in Joomla! 1.5.x, you must have Legacy Mode turned on in Joomla! 1.5.x. To enable legacy mode, go to Extensions | Plugin Manager. Then select the System Legacy plugin and click the enable icon in the toolbar. By enabling this plugin, you will be able to use extensions designed for Joomla! 1.0.x in Joomla! 1.5.x. An indicator for legacy mode will be displayed on the top, right-hand portion of your administration area.
 Additional References
- For instructions on Troubleshooting Joomla! And VirtueMart, click here
- For instructions on Customizing VirtueMart, click here
I am just sharing this Chapter from my book Joomla! E-commerce with VirtueMart, courtesy of my publisher Packt Publishing.