In this tutorial, we will install and configure PrestaShop on our Ubuntu 16.04 server. PrestaShop is a 100% free, open-source e-commerce solution which allows you to maintain your own online shop.
It is written in PHP with support for the MySQL database management system. According to Prestashop’s official website, more than 250,000 e-commerce sites run on PrestaShop.
The installation process is really simple. I will be performing all the operations as root user and if you’re not running as root user then please use sudo before commands.
Install PrestaShop in ubuntu 16.04.
What we need to have before installing PrestaShop in our server.
- LAMP Stack
- A database and user for PrestaShop.
- PrestaShop installation & Configuration
Install LAMP Stack.
Follow the following post to install LAMP stack in UBUNTU 16.04 in less than 5 minutes.
Set up a Database and User for PrestaShop.
Make sure MySQL is running.
root@ubuntu-512mb-nyc1-01:~# systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2016-09-29 18:19:17 UTC; 18h ago Main PID: 5201 (mysqld) Tasks: 32 Memory: 140.4M CPU: 50.612s CGroup: /system.slice/mysql.service └─5201 /usr/sbin/mysqld Sep 29 18:19:15 ubuntu-512mb-nyc1-01 systemd: Starting MySQL Community Server...
Create a database and user.
We will create a Database and user for Database.
I will be using these values for this procedure.
- Database Name: store_db ( change it with your own PrestaShop database name.)
- Database User: owner_of_store ( change it with your PrestaShop database user.)
- Database User’s Password: prestashop_user_pwd ( change it with the password you want to assign to you Prestashop database user.)
root@ubuntu-512mb-nyc1-01:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.7.15-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE store_db; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON store_db.* to 'owner_of_store'@'localhost' identified by 'prestashop_user_pwd'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> FLUS-ceH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> quit Bye root@ubuntu-512mb-nyc1-01:~#
You will need to enter these details later while configuring PrestaShop database.
- PrestaShop Database name.
- PrestaShop User name.
- PrestaShop User’s Password.
Now we have a database and a user for PrestaShop.
Download Prestashop 184.108.40.206 and extract it in /var/www/html directory.
root@ubuntu-512mb-nyc1-01:~# wget https://download.prestashop.com/download/releases/prestashop_220.127.116.11.zip root@ubuntu-512mb-nyc1-01:~# unzip prestashop_18.104.22.168.zip -d /var/www/html/
Give Proper ownership to /var/www/html directory
root@ubuntu-512mb-nyc1-01:~# chown -R www-data:www-data /var/www/html
Editing php.ini for optimal performance.
root@ubuntu-512mb-nyc1-01:~# sed -i '/memory_limit/c\memory_limit = 128M' /etc/php/7.0/cli/php.ini root@ubuntu-512mb-nyc1-01:~# sed -i '/upload_max_filesize/c\upload_max_filesize = 16M' /etc/php/7.0/cli/php.ini root@ubuntu-512mb-nyc1-01:~# sed -i '/max_execution_time/c\max_execution_time = 60' /etc/php/7.0/cli/php.ini
Now the Last thing to do is configure the PrestaShop.
Install & Configure PrestaShop.
In order to install PrestaShop web interface, open a web browser and navigate to the following:
you will see something like this.
Agree with terms and conditions and click Next,
In Installation Assistant, you need to enter your Store Name Description, Your Account info. Remember your E-mail address will be used as your login account.
Fill out the info and click Next.
In Next page, you need to enter your Prestashop database and user info.
Fill out that details carefully and you can Test your database connection to check whether you entered everything carefully.
Testing database connection.
Everything is fine, click Next.
wait for the installation to finish.
Now we need to delete install folder because of security reasons, otherwise, you will see an error page like this when you will click The BACK OFFICE link.
To avoid this error you need to delete install folder.
Now if you have followed all the steps carefully then a single command will be enough to delete the install folder.
shell> rm -rf /var/www/html/prestashop/install
Now everything is fine and you can visit FRONT OFFICE and BACK OFFICE by clicking the links.
PrestaShop is really easy to install and has lots of features to help users in managing their online shop.
And if you want are in a little bit hurry to install PrestaShop to test in a CentOS 7 test server then you can visit Page 2 of this article.
I have tried to cover all the basic to advance concepts with their examples. Still, if I have missed anything please update us through comment box. I will keep updating the same based on feedback’s received.
Thanks for visiting this page and have a great day. 🙂