How to Install PrestaShop on a VPS

PrestaShop is an open-source e-commerce platform offering a good balance between feature depth and resource requirements — lighter than Magento while more purpose-built for e-commerce than a general CMS with a shopping plugin.

Prerequisites

  • Ubuntu 22.04/24.04 VPS: 2 vCPU, 4 GB RAM minimum
  • Nginx or Apache, PHP 8.1+, MySQL/MariaDB

Step 1 — Install Required PHP Extensions

sudo apt install php8.2-gd php8.2-curl php8.2-intl php8.2-mbstring php8.2-xml php8.2-zip php8.2-mysql -y

Step 2 — Create the Database

sudo mysql
CREATE DATABASE prestashop;
CREATE USER 'prestashop'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop'@'localhost';
FLUSH PRIVILEGES;

Step 3 — Download PrestaShop

cd /var/www
sudo wget https://download.prestashop.com/download/releases/prestashop_VERSION.zip
sudo unzip prestashop_VERSION.zip -d prestashop
sudo chown -R www-data:www-data prestashop

Check PrestaShop's official site for the current stable version.

Step 4 — Configure Nginx

server {
    listen 80;
    server_name yourdomain.com;
    root /var/www/prestashop;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}
sudo ln -s /etc/nginx/sites-available/prestashop /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

Step 5 — Run the Web Installer

http://yourdomain.com

Follow the installation wizard: language, store information, and database configuration matching Step 2.

Step 6 — Remove the Install Directory (Required for Security)

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

PrestaShop won't run correctly until this directory is removed after installation completes — also an important security step, since a leftover installer is a common attack vector.

Step 7 — Rename the Admin Directory

The installer typically renames the default admin folder to something unique automatically — note this custom URL, since it's your only way to access the admin panel going forward.

Step 8 — Add HTTPS

sudo certbot --nginx -d yourdomain.com

Step 9 — Configure Payment Modules

Under the admin panel's Modules section, install and configure your chosen payment gateway modules.

Step 10 — Set Up Caching

Enable PrestaShop's built-in cache settings, and consider Redis for session storage on higher-traffic stores — see How to Configure Redis Caching for WooCommerce/Magento for the general pattern, adaptable to PrestaShop's configuration.

Common Errors

Site shows a blank page after install — check PHP error logs; often caused by a missing PHP extension or insufficient memory_limit in php.ini.

"install directory still exists" warning persists — verify the directory was actually deleted, not just renamed, and that file permissions allowed the deletion to succeed.

Continue Reading

Browse more articles in E-commerce Platform Deployment.

  • prestashop installation, prestashop vps, prestashop setup, open source ecommerce
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

How to Deploy WooCommerce on a VPS (Complete Guide)

WooCommerce turns WordPress into a full e-commerce platform — the most widely used option...

How to Install Magento Open Source on a VPS

Magento Open Source (formerly Magento Community Edition) is a powerful, highly customizable...

How to Install OpenCart on a VPS

OpenCart is a lightweight, straightforward open-source e-commerce platform — a good fit for...

How to Optimize a VPS for High-Traffic E-commerce

E-commerce stores face unique performance challenges — dynamic cart/checkout pages that...

How to Set Up SSL and PCI Compliance Basics for an Online Store

Handling payment card data comes with real compliance obligations. This guide covers the...