Introduction

PrestaShop is a free, open-source e-commerce platform. This tutorial will guide you through the process of installing PrestaShop on Ubuntu 22.04.

Prerequisites

Before you begin, ensure you have:

  1. An Ubuntu 22.04 server or desktop system
  2. SSH access to the server (optional)
  3. Root or sudo privileges

Step 1: Install LAMP Stack

Install Apache, MySQL, and PHP:

sudo apt update
sudo apt install -y apache2 mysql-server php php-mysql libapache2-mod-php

Step 2: Configure MySQL

Secure MySQL installation:

sudo mysql_secure_installation

Create a new MySQL database and user for PrestaShop:

sudo mysql -u root -p
CREATE DATABASE prestashopdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'prestashopuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON prestashopdb.* TO 'prestashopuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 3: Download and Extract PrestaShop

Download the latest version of PrestaShop:

cd /tmp
wget https://download.prestashop.com/download/releases/prestashop_1.7.8.1.zip

Unzip the downloaded file:

sudo apt install -y unzip
unzip prestashop_1.7.8.1.zip

Step 4: Move PrestaShop Files

Move the PrestaShop files to the Apache web root directory:

sudo mv prestashop/* /var/www/html/

Step 5: Set Permissions

Set proper permissions for PrestaShop:

sudo chown -R www-data:www-data /var/www/html/

Step 6: Complete Installation

Open a web browser and navigate to your server's IP address or domain name.

Follow the on-screen instructions to complete the installation:

  • Choose your language and click "Next".
  • Read and accept the license agreements.
  • Enter your MySQL database information (database name, username, and password).
  • Follow the rest of the installation steps to configure your shop.

Step 7: Cleanup

Remove the installation files for security:

sudo rm -rf /var/www/html/install/

Conclusion

Congratulations! You have successfully installed PrestaShop on Ubuntu 22.04. You can now start building your e-commerce website using PrestaShop.

Was this answer helpful? 0 Users Found This Useful (0 Votes)