Introduction:
PrestaShop is a popular open-source e-commerce platform that allows you to create and manage your online store with ease. If you’re running Linux Ubuntu 22.04 and want to set up your own PrestaShop store, you’re in the right place. In this guide, we’ll walk you through the step-by-step process of installing PrestaShop on Ubuntu 22.04.

Prerequisites:
Before you begin, make sure you have the following prerequisites in place:

  1. A Linux Ubuntu 22.04 server or virtual machine.
  2. A user account with sudo privileges.
  3. Apache web server installed and configured.
  4. PHP (at least version 7.2) installed and configured.
  5. MySQL or MariaDB server installed and configured.
  6. A domain or subdomain pointing to your server’s IP address.

Let’s get started with the installation:

Step 1: Download PrestaShop

First, navigate to the PrestaShop official website and download the latest version of PrestaShop. You can use wget to download it directly to your server:

wget https://www.prestashop.com/download/old/prestashop_1.7.7.8.zip

Replace the URL with the link to the latest version if it has changed.

Step 2: Extract PrestaShop

Next, unzip the downloaded PrestaShop archive using the following command:

unzip prestashop_1.7.7.8.zip

Again, replace the file name with the version you downloaded.

Step 3: Move PrestaShop Files

Move the extracted PrestaShop files to your Apache web server’s document root. By default, it’s located at /var/www/html/, but you can adjust this to your setup:

sudo mv prestashop /var/www/html/

Step 4: Configure Permissions

Ensure that the web server can write to specific directories. Set the correct permissions:

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

Step 5: Create a MySQL Database

Create a new MySQL database and user for PrestaShop. Log in to MySQL with the following command, and replace your_database_name, your_user, and your_password with your desired values:

mysql -u root -p
CREATE DATABASE your_database_name;
CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Start the Installation

Now, open a web browser and navigate to your server’s domain or IP address. You should see the PrestaShop installation page. Follow the on-screen instructions to complete the installation, providing the database details and other necessary information.

Step 7: Remove Installation Directory

After the installation is complete, remove the « install » directory for security purposes:

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

Step 8: Secure Your Store

For added security, consider configuring an SSL certificate for your domain and enabling HTTPS. You can use Let’s Encrypt to obtain a free SSL certificate.

Conclusion:
Congratulations! You’ve successfully installed PrestaShop on your Linux Ubuntu 22.04 server. You can now start configuring your online store, adding products, and customizing the platform to meet your e-commerce needs. PrestaShop offers a wide range of features and extensions to help you create a robust online shopping experience for your customers. Good luck with your e-commerce venture!