Log inSign up

PrestaShop on a self-managed VPS

Install Nginx, MariaDB and PHP-FPM with the intl, gd, zip and curl extensions, unpack the PrestaShop release into /var/www/prestashop and run install/index_cli.php with your shop details. Remove the install folder, rename the admin folder, add a Certbot certificate and the store is ready for products.

Topic: Websites, CMS and shops · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

What does PrestaShop require on the server?

PrestaShop is a PHP shop that runs on a standard LEMP or LAMP stack with MariaDB or MySQL. Version 9 needs PHP 8.1 or newer, so Ubuntu 24.04, Debian 12 and 13 and the PHP 8.2 module on Rocky or AlmaLinux 9 all work. The 8.x line stopped at PHP 8.1, so a new shop should start on 9.

Memory matters more than CPU at first. A catalogue of a few hundred products with a handful of modules is comfortable on 2 GB of RAM, and 4 GB helps once you add search modules, many languages or frequent imports. Prepare a sudo user, point shop.example.net at the server (see DNS records) and build the stack from the LEMP stack guide if you have not yet.

How do you install the PHP extensions and database?

Add the extensions PrestaShop checks for during install, then prepare MariaDB.

Ubuntu and Debian

sudo apt update
sudo apt install -y nginx mariadb-server php-fpm php-mysql php-intl php-gd php-zip php-curl php-xml php-mbstring php-bcmath php-opcache unzip
php -v

Rocky Linux 9 and AlmaLinux 9

sudo dnf module reset -y php
sudo dnf module enable -y php:8.2
sudo dnf install -y nginx mariadb-server php-fpm php-mysqlnd php-intl php-gd php-pecl-zip php-xml php-mbstring php-bcmath php-opcache unzip
sudo systemctl enable --now nginx mariadb php-fpm

Set memory_limit = 256M, upload_max_filesize = 32M and post_max_size = 32M in the FPM php.ini, then restart PHP-FPM. Create the database:

sudo mariadb-secure-installation
sudo mariadb -e "CREATE DATABASE prestashop CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
sudo mariadb -e "CREATE USER 'psuser'@'localhost' IDENTIFIED BY 'ps-db-secret';"
sudo mariadb -e "GRANT ALL ON prestashop.* TO 'psuser'@'localhost';"

How do you download PrestaShop?

Releases are published as a zip on the project GitHub page. The outer zip holds a second archive named prestashop.zip, which contains the shop itself.

PS_VER=9.0.1
cd /tmp
curl -LO https://github.com/PrestaShop/PrestaShop/releases/download/$PS_VER/prestashop_$PS_VER.zip
unzip prestashop_$PS_VER.zip -d ps-release
sudo mkdir -p /var/www/prestashop
sudo unzip -q ps-release/prestashop.zip -d /var/www/prestashop
sudo chown -R www-data:www-data /var/www/prestashop

Set PS_VER to the latest stable tag on the releases page. On Rocky and Alma change the owner to nginx:nginx.

How do you run the installer from the command line?

The CLI installer creates the tables, the first employee account and the default configuration in one step.

cd /var/www/prestashop
sudo -u www-data php install/index_cli.php --domain=shop.example.net --db_server=localhost --db_name=prestashop --db_user=psuser --db_password=ps-db-secret --prefix=ps_ --name="Example Shop" --country=us --language=en --email=owner@example.net --password=Owner-pass-2026 --ssl=1

Use --ssl=1 only if you will add the certificate before customers arrive; you can also switch HTTPS on later under Shop Parameters. When the command prints a success message, remove the installer and rename the back office folder to something only you know:

sudo rm -rf /var/www/prestashop/install
sudo mv /var/www/prestashop/admin /var/www/prestashop/admin_k7p3m9

The renamed folder becomes your login address, for example https://shop.example.net/admin_k7p3m9.

How do you configure Nginx for PrestaShop?

Route unknown paths to index.php, protect internal folders and pass PHP to FPM.

server {
    listen 80;
    listen [::]:80;
    server_name shop.example.net;
    root /var/www/prestashop;
    index index.php;
    client_max_body_size 32m;

    location ~ /\. { deny all; }
    location ~ ^/(app|bin|cache|classes|config|download|log|src|translations|var|vendor)/ { deny all; }
    location ~* \.(tpl|twig|yml|log|sql)$ { deny all; }
    location /admin_k7p3m9/ { try_files $uri $uri/ /admin_k7p3m9/index.php$is_args$args; }
    location / { try_files $uri $uri/ /index.php$is_args$args; }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_read_timeout 300;
    }
    location ~* \.(css|js|gif|jpe?g|png|svg|webp|woff2?)$ { expires 30d; access_log off; }
}

Replace the admin folder name and socket path with yours. On the RHEL family write it to /etc/nginx/conf.d/prestashop.conf, include fastcgi_params, set SCRIPT_FILENAME and use /run/php-fpm/www.sock. Test with sudo nginx -t and reload. In the back office enable friendly URLs under Shop Parameters, Traffic and SEO.

How do you secure the store with HTTPS?

Open the web ports and let Certbot install the certificate, following the Certbot guide.

sudo ufw allow 'Nginx Full'
sudo certbot --nginx -d shop.example.net
curl -I https://shop.example.net

On Rocky and Alma open the ports with firewall-cmd --permanent --add-service=https and reload. Then turn on both SSL options under Shop Parameters, General so every page and cookie uses HTTPS. Add two factor login for employees with a module, keep the employee list short and remove demo products and unused modules after testing.

How do you set up email and scheduled tasks?

Order mails and password resets should go through an authenticated SMTP relay on port 587, configured under Advanced Parameters, E-mail. Do not assume port 25 is open; ask support with a ticket first if you want to deliver mail directly. SMTP relay for apps walks through the relay side.

Some modules (currency rates, data cleaning, feeds) expect cron. Install the free cron tasks manager module, copy the URL it shows and call it from the system crontab of the web user:

sudo crontab -u www-data -e
*/15 * * * * curl -s "https://shop.example.net/modules/cronjobs/cron.php?token=YOUR_TOKEN" > /dev/null

How do you update and back up PrestaShop?

Use the official update assistant module from the back office, which backs up files and the database, downloads the new release and migrates the schema. Before any update, copy the shop yourself as well:

sudo mariadb-dump --single-transaction prestashop | gzip > ~/prestashop-db.sql.gz
sudo tar -czf ~/prestashop-files.tar.gz -C /var/www prestashop

Store those copies off the server, for example with rsync. Major version jumps (8 to 9) can break third party modules and themes, so test the upgrade on a second VPS first. If the shop shows a white page, switch on debug mode by setting _PS_MODE_DEV_ to true in config/defines.inc.php, read the message, and switch it off again. Clearing var/cache fixes most problems after module changes.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-2a new shop with a small catalogue1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months
A2-4more products, languages and modules2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months

Questions about PrestaShop store on Nginx

Which PrestaShop version should a new shop use?

Start on the latest 9.x release. It supports current PHP versions, and modules for the 9 line are what developers now target.

Why does the installer say a PHP extension is missing?

Install the package named in the message (for example php-intl or php-zip), restart PHP-FPM and run the installer again.

I forgot the renamed admin folder. How do I find it?

List the shop directory with ls /var/www/prestashop. The folder starting with admin is the back office.

Can I accept crypto payments in PrestaShop?

Yes, through payment modules that connect to a crypto payment processor. Install them from trusted sources only and test in sandbox mode before going live.

How much RAM does PrestaShop need?

About 2 GB runs a small store. Go to 4 GB or more for large catalogues, many languages or heavy modules.