Search results for:
Table of Contents
Prestashop is an e-commerce framework built on PHP and MySQL. It provides a theme-type interface, an easy-to-organize catalog of products, and ties into many different payment and shipping platforms. Additionally, it tracks statistics, metrics and is translated into almost 200 languages for easy internationalization. Prestashop is open source, making it a free solution for these well sought-after platforms.
Prestashop provides customization, giving you the ability to choose your colors, logo, and design from among a selection of hundreds of themes. Management of customer relations, statistics, product tracking, and orders can all be done using the Prestashop GUI. In addition, it supports multiple currencies and social media integration.
PrestaShop requires Apache, MySQL, and PHP and can be installed on Linux, Windows, or OS X. Specifically, Apache 2.2 or Nginx, PHP 7.1 or higher, and MySQL 5.6 or higher are required. The PHP extensions CURL, DOM, Fileinfo, GD, Intl, Mbstring, Zip, Json, and icons are also necessary.
Note: It's recommended to use a server with 2GB or more RAM.
Below are the steps to install the PrestaShop requirements on a Linux VPS (Virtual Private Server) or Dedicated Server.
Before installing PrestaShop itself, you will need to first prepare the following on your server by logging into your server via SSH. These steps are the foundation needed to set up the Prestashop framework.
Step 1: Before beginning further installation, ensure your OS is up-to-date by running the following command
We will be installing Apache with dnf, which is the default package manager for CentOS 8:
dnf install httpd
After installing Apache services on your system, start all required services:
systemctl restart httpd systemctl status httpd systemctl enable httpd
You can verify that Apache is running by opening your favorite web browser and entering the URL http://your-server's-address.
Step 1: Install MariaDB
dnf install mariadb-server systemctl start mariadb
Step 2: Secure MariaDB
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script.
It would be best if you read and below each step carefully to set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
Note: there is no root password by default, hit enter when asked.
Step 3: Restart the MariaDB database server and enable it to start on the system start-up.
systemctl restart mariadb systemctl status mariadb systemctl enable mariadb
Step 1: Install PHP and required modules
dnf install php php-common php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-gd php-mbstring php-xml php-zip php-json php-intl
Step 2: Restart Apache using systemctl for the changes to take effect:
systemctl restart httpd
Step 3: Test your PHP installation to make sure it is installed correctly.
Create a new file called test.php on /var/www/html and add the following:
nano /var/www/html/info.php <?php phpinfo(); ?>
Then press ctrl-x, y, enter to save and exit nano.
Access http://[your server IP]/info.php to confirm that the PHP is installed.
Step 1: Download the PrestaShop archive:
On https://www.prestashop.com/en/versions right-click on 'download' and chose 'Copy Link address'
In your SSH terminal, type
cd /var/www/html/ wget
And space, then right-click to paste the URL, then enter.
Alternatively, you can download it to your desktop and then use SFTP to upload it.
Step 2: Unzip the zip file:
And set the permissions so PHP can write to the directory:
chown -R root.apache /var/www/html/ chmod 775 /var/www/html/
Step 3: Create a database for PrestaShop.
Log into MySQL with the password for root you set in the mysql_secure_installation step above.
mysql -u root -p
In the MySQL Command line, enter:
CREATE DATABASE presta_db; GRANT ALL ON presta_db.* TO 'presta_user'@'localhost' IDENTIFIED BY 'ThisShouldBeAStrongerPassword' WITH GRANT OPTION; FLUSH PRIVILEGES; exit
Step 4: Start the PrestaShop installation.
In a web browser, navigate to http://[your server ip]/, and it should start unzipping the PrestaShop file and installing it. It will then give you the options to:
PrestaShop will then finish the installation.
Step 5: Post Install Cleanup
Per the last page in the installation, the /install directory needs to be deleted. In the command line on the server, run.
rm -rf /var/www/html/install
Step 6: Log into the shop backend.
In your browser, navigate to http://[your server IP]/admin and log in with the email/password you set during the Prestashop installation on the 'Store Information' page. It will generate a new random admin URL (for security reasons) and redirect you.
You're all done! You can now set up the shop, add products, configure shipping, payment, and other plugins, and start selling.
Written by Hostwinds Team / July 30, 2021