Selling your products online
Selling online is now easier than ever and with tools like Shopify, Prestashop, Magento, Open Cart and many more. It is now possible to setup your own customized website very quickly.
Each of the platforms are having their own pros and cons - before you decide to opt for a particular platform - you need to decide what is that you are looking for and weigh your options on going with one platform over the other.
Prestashop is an open source e-commerce platform written in PHP programming language with mysql database management system. It is free to download and you can customize the platform as per your business requirements. According to the official stats on Prestashop - there are more than 300,000 e-commerce websites currently running on the platform in over 190 countries.
Prestashop is also having an extensive library of more than 10000 modules, themes and other services for your use - using which you can customize your website.
Install Prestashop on Ubuntu 20.04
Before you go ahead and install the Prestashop e-commerce platform on our server - we first need to ensure the following prerequisites are met:
- Web Server (you can read more about why I recommend using Digital Ocean on the following link: Website on the cloud for just 5$ per month)
- We have access to Ubuntu 20.04 server with root access.
- We have downloaded the Prestashop resource files from the following link: Prestashop
- Our web server is setup and enabled with Apache or NGINX server
- PHP and Mysql are installed on the server.
- 1 Domain name - pointed correctly with the A records to the server IP address. In this example, we are using the domain - kidolea.com - which is configured to direct to a cloud server by adding an A record.
As the first step, we need to setup the basic Ubuntu 20.04 server and use SSH commands logon to the server.
Once you logged on to your cloud server, as a first step you need to make sure all the installed packages are up to date. This can be achieved by the following commands:
sudo apt update
Once you have updated the server, please type the following command to upgrade the server with the latest downloaded packages.
sudo apt upgrade
Install Apache Server ( and LAMP Stack)
In this particular case, we will be installing Apache Server for our requirement. To install Apache server use the following command:
sudo apt install apache2 -y
Once Apache server is installed, you need to enable mod_rewrite to ensure that the system generated URLs are more readable.
sudo a2enmod rewrite
Install PHP and configure settings
We now need to install PHP. PHP is a programming language - which powers normal HTML pages with added functionalities. Most of the prominent open source projects are built on PHP.
You can install PHP using the following command:
sudo apt install php7.4 libapache2-mod-php7.4 php7.4-mysql php7.4-soap php7.4-bcmath php7.4-xml php7.4-mbstring php7.4-gd php7.4-common php7.4-cli php7.4-curl php7.4-intl php7.4-zip zip unzip -y
Once PHP is installed, we need to update the following two variables - memory_limit & upload_max_filesize located in the php.ini file.
Based on the version you have installed, you need to find the location of php.ini and make the above changes.
php -i | grep -i php.ini
Once you have identified the location, use the following command to open the file:
sudo nano /etc/php/7.4/apache2/php.ini
Once you are inside the file - type CTRL+W to search for the following two variables (as per your server allowances) : memory_limit & upload_max_filesize
memory_limit = 2G
Another important we need to make is to change the the filesize for upload. This is crucial - when we try to install modules.
upload_max_filesize = 32M
Once the file is updated, then you can press CTRL + X to exit and save.
Once those changes are done - you need to restart the server to make the changes to take effect.
sudo systemctl restart apache2
MySQL is a database management that allows the system to store information on the server and retrieve it when needed.
sudo apt install mysql-server -y
Once you have installed - mysql - you can login to mysql from the console using the following command:
mysql -u root -p
Then we need to create the Database, User and grant all privileges on the DB (in my case - I am using mysql Ver 8.0 running on ubuntu0.20.04) to the user.
CREATE DATABASE presta; CREATE USER 'presta'@'localhost' IDENTIFIED BY 'strong_password'; GRANT ALL ON presta.* TO 'presta'@'localhost'; FLUSH PRIVILEGES; quit
Please make sure to replace strong_password - with your own password option.
Once you have completed the above steps, next you need to download the latest version of Prestashop on to the server.
For this, we need to create the domain file folder using the following commands:
sudo mkdir -p /var/www/kidolea.com/public_html
Once the folder is created, you need to first download Prestashop from the repository to your server. For this, I recommend creating a new folder (example - psp) - where you can download the software.
cd psp/ wget https://github.com/PrestaShop/PrestaShop/releases/download/184.108.40.206/prestashop_220.127.116.11.zip unzip prestashop_18.104.22.168.zip unzip prestashop.zip -d /var/www/kidolea.com/public_html/
Once the zip folder is inflated in to the destination folder - you need to give permissions for www-data user to initiate the install.
sudo chown -R www-data: /var/www/kidolea.com/public_html/
With this, you can now go ahead to your domain http://kidolea.com - to initiate the installation steps.
If you think, you are overwhelmed with the information listed above.
Feel free to reach out to me using my contact page and I would be glad to help you and work with you to enable your ideas. Thank you.