How to install OpenCart on a Linux Virtual Server
This install guide assumes that Apache, MySQL and PHP 5 are already installed and configured on one of our Linux Virtual Server hosting plans.
Open the PHP configuration file (php.ini) and check if ‘Register Globals’, ‘Magic Quotes GPC’ and ‘Session Auto Start’ settings are set to Off and the ‘File Uploads’ setting is set to On. In order to find the location of ‘php.ini’ configuration file, execute the following command:
# php -i | grep php.ini Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.ini
Also, make sure that PHP is compiled with the following extensions: MySQL, GD, cURL, mCrypt and ZIP.
Download OpenCart from the OpenCart website (http://www.opencart.com/index.php?route=download/download) . At the time of writing this tutorial, the latest stable version is OpenCart 22.214.171.124.
cd /var/www/html/ wget https://github.com/opencart/opencart/archive/v126.96.36.199.zip unzip v1.5.5*
Log in to the MySQL console and create a database called ‘opencartdb’, assign a user to it, and assign the user ALL Privileges:
mysql> create database opencartdb; mysql> GRANT ALL PRIVILEGES ON opencartdb . * TO [email protected]'localhost' IDENTIFIED BY 'xxxxxx' WITH GRANT OPTION; mysql> flush privileges;
Do not forget to change ‘xxxxxx’ with your ‘opencart’ MySQL user password.
Alternatively, the MySQL database for the OpenCart shopping cart system can be created using phpMyAdmin.
Execute the following commands:
mv opencart-188.8.131.52 opencart chgrp apache -R opencart/ cd opencart mv upload store cd store mv config-dist.php config.php mv admin/config-dist.php admin/config.php
Make sure the following files and directories are writable for your web server user:
config.php admin/config.php system/cache/ system/logs/ image/ image/cache/ image/data/ download/
Open http://<your-domain.com>/opencart/store/ in your favorite web browser, follow the onscreen instructions and complete the installation.
Do not forget to delete the install directory after the installation is complete for security reasons.
The administrator back-end is now available at http://<your-domain.com>/opencart/store/admin/
Of course, if you are one of our Linux VPS customers, you don’t have to do any of this, simply ask our admins, sit back and relax. Our admins will install it for you 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.