// Blog

How to Install and Configure PrestaShop on a Linux VPS: Complete Guide — CLIQHOST

October 16, 2026 · by Alex M.

How to Install and Configure PrestaShop on a Linux VPS: Complete Guide — CLIQHOST

PrestaShop is one of the most widely adopted open-source e-commerce platforms in the world, powering over 300,000 online stores across multiple continents. Whether you're launching a new shop or migrating from another platform, deploying PrestaShop on your own NVMe VPS gives you complete control over performance, security and scalability — far beyond what shared hosting can offer.

In this guide we'll walk through installing PrestaShop 8.x on Ubuntu 22.04, using Nginx, PHP 8.1 and MariaDB.

Prerequisites

Before we begin, make sure you have:

  • A VPS SSD or NVMe VPS running Ubuntu 22.04 (2 GB RAM minimum recommended)
  • Root or sudo SSH access
  • A domain name pointed to your VPS IP address
  • Basic familiarity with the Linux command line

If you don't yet have a VPS, check out CLIQHOST's VPS plans — affordable options with fast deployment.

Step 1: Update the Server and Install Dependencies

SSH into your server and update all packages:

sudo apt update && sudo apt upgrade -y

Install the core packages we'll need:

sudo apt install nginx mariadb-server mariadb-client unzip curl wget -y

Install PHP 8.1 with Required Extensions

PrestaShop 8.x requires PHP 8.1 or higher. Add the Ondřej Surý PPA and install:

sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php8.1 php8.1-fpm php8.1-mysql php8.1-curl php8.1-gd \
  php8.1-intl php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath \
  php8.1-soap php8.1-opcache -y

Verify the installed version:

php -v

Step 2: Configure MariaDB

Run the initial security script:

sudo mysql_secure_installation

Answer Y to all prompts and set a strong root password. Then create the PrestaShop database:

sudo mysql -u root -p

Inside the MySQL console:

CREATE DATABASE prestashop_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'StrongPassword!';
GRANT ALL PRIVILEGES ON prestashop_db.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 3: Download and Extract PrestaShop

Navigate to the web root and download the latest stable release:

cd /var/www/
sudo wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip
sudo unzip prestashop_8.1.7.zip -d prestashop
cd prestashop
sudo unzip prestashop.zip
sudo rm -f prestashop.zip Install_PrestaShop.html

Set the correct ownership and permissions:

sudo chown -R www-data:www-data /var/www/prestashop
sudo find /var/www/prestashop -type d -exec chmod 755 {} \;
sudo find /var/www/prestashop -type f -exec chmod 644 {} \;

Step 4: Configure Nginx for PrestaShop

Create a new virtual host configuration file:

sudo nano /etc/nginx/sites-available/prestashop

Paste the following configuration:

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

    access_log /var/log/nginx/prestashop_access.log;
    error_log  /var/log/nginx/prestashop_error.log;

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

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    # Security — block access to sensitive files
    location ~ /\. {
        deny all;
    }

    location ~* \.(htaccess|htpasswd|ini|log|sh|sql)$ {
        deny all;
    }

    gzip on;
    gzip_types text/plain text/css application/json application/javascript text/xml;
}

Enable the site and restart Nginx:

sudo ln -s /etc/nginx/sites-available/prestashop /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Step 5: Install SSL with Let's Encrypt

SSL is not optional for an online store — it's a trust signal and a Google ranking factor. Install Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d shop.yourdomain.com -d www.shop.yourdomain.com

Certbot will automatically configure HTTPS and HTTP-to-HTTPS redirection. If you need commercial certificates (OV or EV), explore SSL certificates from CLIQHOST for enhanced customer trust.

Step 6: Tune PHP for PrestaShop

Edit the PHP-FPM configuration file:

sudo nano /etc/php/8.1/fpm/php.ini

Adjust these values:

memory_limit = 256M
max_execution_time = 300
upload_max_filesize = 64M
post_max_size = 64M
max_input_vars = 5000
date.timezone = Europe/Chisinau

Enable and configure OPcache for best performance:

opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=2

Restart PHP-FPM:

sudo systemctl restart php8.1-fpm

Step 7: Complete the Web-Based Installation

Open your browser and navigate to your domain. The PrestaShop installation wizard will guide you through:

  1. Language selection — choose your preferred store language
  2. License agreement — accept the terms
  3. System compatibility — verify all PHP extensions show green checkmarks
  4. Store information — store name, admin email, activity category
  5. Database configuration — enter the credentials from Step 2:
    • Server: localhost
    • Database name: prestashop_db
    • Username: prestashop_user
    • Password: StrongPassword!
  6. Installation — PrestaShop creates tables and optionally imports demo data

Once done, you'll see links to your store front-end and the back-office admin panel.

Step 8: Critical Post-Installation Security Steps

Do not skip this section — these steps are mandatory for a secure production store.

Delete the Installation Directory

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

Leaving this directory in place allows anyone to wipe and reinstall your store.

Rename the Admin Directory

The default admin folder is a common brute-force target:

sudo mv /var/www/prestashop/admin /var/www/prestashop/admin_$(openssl rand -hex 4)

Note the new name — you'll use it to access the back-office.

Re-apply File Permissions

sudo find /var/www/prestashop -type d -exec chmod 755 {} \;
sudo find /var/www/prestashop -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/prestashop/var
sudo chmod -R 775 /var/www/prestashop/img
sudo chmod -R 775 /var/www/prestashop/upload

Step 9: Essential Back-Office Configuration

Log in to https://shop.yourdomain.com/admin_XXXX and configure the following:

Friendly URLs and SEO

Go to Shop Parameters → SEO & URLs and enable Friendly URLs. The Nginx configuration from Step 4 already handles the necessary rewrite rules.

Performance and Caching

In Advanced Parameters → Performance:

  • Enable CCC (Combine, Compress and Cache) for CSS and JavaScript files
  • Enable Smarty cache and template compilation
  • Configure media servers if you use a CDN

SMTP Email

Under Advanced Parameters → Email, configure a proper SMTP server. Avoid using the PHP mail() function in production — it has poor deliverability and no authentication.

Step 10: Automated Backups and Monitoring

Running an online store without backups is a serious risk. Set up a simple daily backup script:

#!/bin/bash
DATE=$(date +%Y%m%d)
mysqldump -u prestashop_user -p'StrongPassword!' prestashop_db > /backup/db_$DATE.sql
tar -czf /backup/files_$DATE.tar.gz /var/www/prestashop
find /backup -mtime +7 -delete

Schedule it with crontab to run daily at 3:00 AM:

crontab -e
# Add:
0 3 * * * /bin/bash /root/backup_prestashop.sh

If you'd rather delegate server management entirely, CLIQHOST offers managed server administration services — including monitoring, security patching and automated backups.

Troubleshooting Common Issues

"Maximum number of inputs exceeded" Error

Fix: increase max_input_vars in php.ini to 5000 or higher, then restart PHP-FPM.

Images Not Displaying

Check permissions on the /img directory:

sudo chown -R www-data:www-data /var/www/prestashop/img
sudo chmod -R 775 /var/www/prestashop/img

Slow Store Performance

  • Verify OPcache is active: php -r "phpinfo();" | grep opcache
  • Enable caching in Back Office → Performance
  • Consider upgrading to an NVMe VPS for faster disk I/O
  • Disable unused PrestaShop modules — they all add overhead

500 Errors After an Update

Check the logs:

sudo tail -f /var/log/nginx/prestashop_error.log
sudo tail -f /var/www/prestashop/var/logs/prod.log

VPS vs Shared Hosting for PrestaShop

Factor Shared Hosting CLIQHOST VPS
Resources Shared pool Dedicated
PHP configuration Limited Full control
Performance Variable Consistent
Scalability Difficult Easy
Best for Small/test stores Production e-commerce

For a small proof-of-concept, cPanel shared hosting can work, but any store expecting real traffic should run on a VPS or dedicated server.

Conclusion

You now have a fully functional PrestaShop installation on a Linux VPS — secured with HTTPS, optimised PHP, and daily automated backups. This setup gives you the performance and flexibility needed to grow a real e-commerce business without hitting the ceilings imposed by shared hosting.

Ready to power your online store with reliable, fast infrastructure? Explore CLIQHOST VPS plans or reach out through our contact page for a tailored recommendation.

SHARE
// what clients say

What Our Clients Say

Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.

★★★★★

"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."

AM
Andrei M.
eCommerce owner · Chișinău
★★★★★

"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."

EV
Elena V.
Web agency · Bălți
★★★★★

"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."

DC
Dmitri C.
SaaS founder · Chișinău