Setting up our environment for OpenCart

We have discussed a lot, now let’s start working. Our first recipe is an environment setup. Without the proper environment, it is difficult to work. Let’s first know what the requirements are to work with OpenCart.

1.  Getting ready

OpenCart works with at least PHP 5. So, we must ensure at least the support of PHP 5. OK, let’s see what other things we need:

⯈     PHP 5

⯈     MySQL

⯈     Web server (preferably Apache)

We are going to use Xampp for setting up the environment. Xampp is a free and open source cross-platform, web server package. It consists mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages. The ‘X’ in Xampp means cross platform. So, Xampp is available for Microsoft Windows, Linux, Solaris, and Mac OS X, and is mainly used for web development projects.

There are different Xampp packages for different operating systems, so, grab the one you need for your specific operating system. Xampp requires only one .zip, .tar, or .exe file to be downloaded and run, and little or no configuration of the various components that make up the web server is required. Here is the Xampp website link for download and installation process:

This site has good documentation about the installation process of Xampp for different operating systems. We will see the installation process for Windows here. Go to this link:

We will be using Xampp 1.7.3. It comprises the following:

⯈     Apache 2.2.14

⯈     MySQL 5.1.41

⯈     PHP 5.3.1

⯈     phpMyAdmin 3.2.4

⯈     perl 5.10.1

⯈     FileZilla 0.9.33

⯈     Mercury 4.72

2. How to do it…

OK, now get the .exe file that is 51.2 MB. We will install Xampp in a drive other than the C drive, because if we reinstall Windows in our machine, then our files will be deleted.

Say we install it in the E drive. Follow the steps to install Xampp:

  1. Double click the installer,
  2. Choose the appropriate folder for

  1. Follow the instructions on the installation This window will show installation progress status.
  2. Now, open the Xampp control There, we will see separate controls for Apache, MySQL, FileZilla, and Mercury.
  3. Click the Start button to start the respective There is a status message of the current state of the selected feature.

We have installed Xampp successfully.

3.  There’s more…

There are other packages of AMP families. We have discussed only Xampp, as we have seen earlier that it is cross platform. There are also other web server packages:

  1. Wamp for Windows environment
  2. Lamp for Linux environment
  3. Mamp for Mac environment

Source: Hasan Tahsin (2011), OpenCart 1.4 Template Design Cookbook, Packt Publishing.

Leave a Reply

Your email address will not be published. Required fields are marked *