This install guide will help you install Zen Cart and it assumes that Apache, MySQL and PHP 5 are already installed and configured on one of our Linux virtual server hosting plans.
Download the latest version of Zen Cart (at the time of writing this tutorial, the latest stable version is 1.5.1):
Extract the downloaded zip file to the Document Root directory of your website:
unzip zen-cart-*.zip -d /var/www/html/ mv /var/www/html/zen-cart-* /var/www/html/zen-cart/
make sure the web server Apache is running on the server and has permissions to write and create directories in it.
Zen Cart requires a MySQL user and database, so create them by executing the following commands:
mysql -u root -p CREATE DATABASE zencart; CREATE USER 'zencartuser'@'localhost' IDENTIFIED BY 'your-password-here'; GRANT ALL PRIVILEGES ON zencart.* TO 'zencartuser'@'localhost'; FLUSH PRIVILEGES;
Also, create a new virtual host in Apache, for example:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot /var/www/html/zen-cart/ ServerName your-domain.com ServerAlias www.your-domain.com ErrorLog logs/your-domain.com-error_log CustomLog logs/your-domain.com-access_log common </VirtualHost>
Restart your Apache service for the changes to take effect.
Set the permissions for these files and directories to 777 using the following commands:
cd /var/www/html/zen-cart/ mv admin/includes/dist-configure.php admin/includes/configure.php mv includes/dist-configure.php includes/configure.php chmod 777 admin/includes/configure.php chmod 777 includes/configure.php chmod 777 cache chmod 777 includes/languages/english/html_includes chmod 777 logs chmod 777 media chmod 777 pub chmod 777 images/ chmod 777 admin/backups chmod 777 admin/images/graphs
Open http://your-domain.com/zc_install in your favorite web browser, follow the onscreen instructions and complete the installation.
For security reasons, delete the ‘/zc_install’ directory and reset permissions of your ‘/admin/includes/configure.php’ and ‘/includes/configure.php’ files to read-only mode. Also, rename the ‘/admin’ directory to a name less likely to be ‘guessed’ by someone probing your site for illegitimate access.
The administrator back-end is available at https://your-domain.com/zen-cart/(renamed-admin-directory)
Of course, if you are one of our Linux VPS Hosting customers, you don’t have to do any of this, simply ask our admins, sit back and relax. Our admins will install Zen Cart 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.