Install PrestaShop on CentOS

Install PrestaShop on CentOS

prestashop website, PrestaShop is the most powerful, dynamic and fully-featured free eCommerce software enriched with innovative tools.


Disable Selinux
Install the LAMP stack
Create a Database/User
Confirm the installation of the PHP modules GD, Mcrypt, Mbstring and PDO MySQL

1. Disable Selinux

Need to edit the selinux configuration file located at : /etc/selinux/config
Modify the SELINUX parameter to disabled and reboot the server.

2. Install the LAMP stack

I’ve set a proper hostname for my server and start with the LAMP installation. Firstly, install Apache.

yum install httpd -y

This will install all the required Apache packages. Make sure it is enabled and working in the server.

systemctl enable httpd
ln -s ‘/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/’

systemctl status httpd.service

Now create the VHOST for the domain which we’re planning to install Prestashop. I’m installing Prestashop for my domain
Here is my Vhost for the domain. Make sure you create the document root and log folders, here it is /var/www/ and /var/www/ before restarting the Apache.

cat /etc/httpd/conf.d/vhost.conf
NameVirtualHost *:80
DocumentRoot /var/www/
ErrorLog /var/www/
CustomLog /var/www/ combined

Now install MySQL, I’m installing MySQL 5.5. Download your MySQL Community Repository in your Linux distribution. I downloaded the latest MySQL repo. And installed MySQL 5.5 in my server. Please see the steps I did to choose my required version.

yum localinstall mysql57-community-release-el7-7.noarch.rpm
yum install -y yum-utils *//Install the yum-utility packages //*
yum repolist enabled | grep “mysql.*-community.*” *//Checked the enabled repo before installation //*
yum-config-manager –disable mysql57-community *//Disabling MySQL 5.7 repo from installing*//
yum-config-manager –enable mysql55-community *//Enabling the MySQL 5.5 Repo from the Yum repository //*
yum repolist enabled | grep “mysql.*-community.*” *//Confirm the enabled MySQL repo versions //*
yum install mysql-community-server

After completing with the installation, start the MySQL service and confirm its status.

service mysqld start
systemctl status mysqld.service
mysql –version

Now you can run the MySQL secure installation script to secure your MySQL installation by removing remote root login, setting root password, disabling anonymous users etc as needed.


Now it’s time for PHP. Install the PHP with all required modules.

yum install php-mcrypt php php-common php-pdo php-cli php-mysql php-gd php-xml libtool-ltdl mhash mcrypt -y
php -v

3. Create a Database/User

Now create a database for Prestashop installation. I created a database namely prestashopdb and user prestashopuser prior to the installation. You can do it from MySQL CLI or you can install PhpMyadmin and manage databases using that.

mysql> create database prestashopdb;
mysql> GRANT ALL ON prestashopdb.* TO prestashopuser@localhost IDENTIFIED BY ‘prestashop123#’;
mysql> flush privileges;
mysql> quit

4. Confirm the installation of the PHP modules GD, Mcrypt, Mbstring and PDO MySQL

PHP modules like GD and PDO MySQL are installed during the initial PHP setup. I need to enable the Mcrypt and MBstring module to complete the pre-requisites for the Prestashop installation.

Mcrypt Installation:

Install EPEL repo for YUM
yum -y install epel-release
yum install php-mcrypt -y

MBstring installation

yum install php-mbstring -y

Installing Prestashop
Download the latest Prestashop version from the link and extract it in the home folder. Modify the permissions of the folders/files to 755.

chmod -R 755 *.*
cp -rp prestashop/* /var/www/

Now copy the prestashop folder contents from /home to document root of the required domain which is meant to be our online store. It is this path “/var/www/” in my case.

Now open up in your browser the URL >>

Please navigate through the screenshots which describes each installation stage.

Stage 1 : Language Selection

Install PrestaShop on CentOS

Stage 2 : License Agreement

Agree the terms and conditions in the license agreement and click “Next” to proceed further.

Install PrestaShop on CentOS

Stage 3 : System Compatibility check

It will check for the installation of the required PHP modules and folders/file permissions to continue with the installation.

Install PrestaShop on CentOS

Stage 4: Creating your own Store information:

Install PrestaShop on CentOS

Stage 6 : Installation Stage, prestashop website

Install PrestaShop on CentOS

Stage 7 : Final Stage

It will provide you with the login credentials to manages your Online store.

Install PrestaShop on CentOS

Now you’re all set with your installation.  Please make sure to delete your “Install” folder from your domain document root for security reasons.

How can we access the Admin Panel?

Before accessing the admin Panel for our installation, you need to rename your “admin” folder under the installation domain document root to some other name for security reasons. Or else you will get a message like this on the browser while accessing your admin panel.

For security reasons, you cannot connect to the back office until you have
renamed the /admin folder (e.g. admin847v0u8kk/)
Please then access this page by the new URL (e.g.

I renamed my admin folder and accessed my admin panel with the login credentials.  You can manage your products, orders, customers, price details etc from this.

Install PrestaShop on CentOS

magento developer
prestashop ecommerce
opencart development company
ecommerce wordpress
E-Commerce Website

Register New Account
Reset Password
Compare items
  • Total (0)