Install PrestaShop on a CentOS VPS

PrestaShop is an open-source e-commerce application which allows you to maintain your own online store. It is very easy to use as well as very easy to install. In this article we will show you how to install and configure Prestashop on your CentOS VPS.

To proceed with this installation you will need to have a basic knowledge of Linux and have LAMP installed on your VPS. If you don’t have a LAMP stack installed on your server, you can follow our guide on how to install LAMP on CentOS guide.

Installation Guide:

First make sure that your system is up to date:

yum -y update

Now download the latest release from the official PrestaShop website, unpack the installation package on your local machine and upload it on your server:

Download the PrestaShop installation in your ‘/var/www/html’ directory using the commands:

cd /var/www/html/
wget http://downloads.sourceforge.net/project/prestashop/prestashop%20v1/1.6.1%20stable/prestashop_1.6.1.4.zip

Next Unzip the file using the command:

Unzip prestashop_1.6.1.4.zip -d /var/www/html

Set the folder permissions:

chown -R apache:apache /var/www/html/prestashop

Once the installation done, you can proceed with creating a database and its user. To create a database user, log in to your MySQL server and execute the following commands:

create database prestashop;
GRANT ALL ON prestashop.* TO prestashopuser@localhost IDENTIFIED BY 'yourpassword';
flush privileges;

Do not forget to change ‘YOURPASSWORD with a password of your choice.

You can now set up your web server. If you are using Apache as a web server, you need to edit your ‘/etc/httpd/conf/httpd.conf’ file. Open it with your favorite text editor and add the following lines:

<VirtualHost *:80>   
ServerAdmin webmaster@yourdomain.com   
DocumentRoot /var/www/html/prestashop   
ServerName yourdomain.com   
ErrorLog logs/prestashop.yourdomain.com-error_log   
CustomLog logs/prestashop.yourdomain.com-access_log common</VirtualHost>

Save and close the file. Restart the apache service for the changes to take effects:

Service httpd restart

By default PrestaShop will be available on HTTP port 80. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip/ and complete the required steps to finish the installation.