PrestaShop: Complete Guide to Installing an Online Store on VPS

16.01.2026
15:54

PrestaShop is a European e-commerce platform with open-source code, powering over 300,000 online stores worldwide. Started as a student project at a Paris IT school in 2005, today it's a comprehensive store management system supporting 60 languages and thousands of ready-made modules.

Unlike cloud solutions like Shopify where you rent the platform, PrestaShop installs on your own server. Full control over data, no sales commissions, unlimited customization possibilities. But you need a VPS with proper configuration—this guide covers everything in detail.

Why PrestaShop is Chosen for Online Stores

PrestaShop occupies a special place among e-commerce platforms. Not as simple as WooCommerce, not as heavy as Magento. The golden middle ground for serious small and medium-sized stores.

The main audience is the European market. Developed in France, strongest presence in Europe and CIS countries. For sales in Russia, Ukraine, Kazakhstan, PrestaShop is an excellent choice—top-level localization, active Russian-speaking community, modules for local payment systems available.

Out-of-the-box functionality is impressive. Product catalog management with variations, discount and promotion system, multi-language support, multiple currencies, integration with dozens of payment systems and delivery services. A small store will suffice with standard features, a large one will add modules as needed.

PrestaShop performance depends on hosting more than the platform itself. On a properly configured VPS, a store with thousands of products runs fast. On weak shared hosting, even a hundred products lag. A VPS with NVMe drives like THE.Hosting allows PrestaShop to fully unlock its potential.

The community and ecosystem are huge. The official Addons marketplace offers over 5000 modules and themes. Most are paid ($50-300), but quality ones. Free modules also exist, sufficient for basic tasks. Documentation is detailed, forums are active, PrestaShop developers are easy to find.

PrestaShop 9: What's New in the Latest Version

PrestaShop 9.0 was released in June 2025 and brought significant improvements. Migration to Symfony 6.4 and PHP 8.4 provides noticeable performance and security gains. The platform processes requests faster and uses less memory.

The new Hummingbird theme is optimized for mobile devices. 70% of online purchases happen from smartphones—the theme is optimized exactly for this. Page loading is faster, interface is adaptive, checkout process is simplified.

Admin API opens possibilities for integrations. Previously, connecting external systems (CRM, ERP, warehouse management) required workarounds. Now there's a REST API for all main operations—creating orders, managing products, customers, statistics.

Improved SEO tools help with promotion. URL management has become more flexible, canonical tags are configured correctly, redirects work without plugins. For stores where SEO is critical, this is a significant plus.

The update mechanism has been reworked. Previously, updating PrestaShop from 1.6 to 1.7 turned into a quest with potential store breakage. Now the process is safer, rollback is faster, data migration is more reliable.

System Requirements for PrestaShop 9

PrestaShop is demanding on server resources. Minimum requirements for launch exist, but comfortable store operation requires more.

Operating System:

  • Ubuntu 22.04 or 24.04 LTS (recommended)
  • Debian 11 or 12
  • AlmaLinux 9 or Rocky Linux 9
  • CentOS Stream 9

Ubuntu 24.04 LTS is the optimal choice—fresh packages, long support until 2029, large community. THE.Hosting VPS comes with Ubuntu available out of the box when ordering a server.

Web Server:

  • Apache 2.4+ with mod_rewrite
  • Nginx 1.20+ (faster than Apache)
  • LiteSpeed (commercial but fast)

Nginx is recommended for production. Processes static files faster than Apache, uses less memory, scales easier under load. For a high-traffic PrestaShop store, Nginx is critical.

PHP:

  • PHP 8.1, 8.2, or 8.3 (8.3 recommended)
  • Extensions: curl, gd, intl, mbstring, xml, zip, json, PDO MySQL

PHP 8.3 provides 20-30% performance gain over PHP 7.4. PrestaShop 9 is fully compatible with PHP 8.3. Using old PHP versions slows down the store and creates security holes.

Database:

  • MySQL 5.7+ (minimum)
  • MySQL 8.0+ (recommended)
  • MariaDB 10.6+ (MySQL alternative)

MariaDB 10.11 is the optimal choice for PrestaShop. Performance is higher than MySQL 8.0 on some operations, license is freer, compatibility is complete. THE.Hosting VPS ships with MariaDB by default.

Hardware Resources:

Minimum configuration (up to 1000 products, 100 orders/day):

  • 2 GB RAM
  • 2 CPU cores
  • 20 GB SSD

Recommended configuration (up to 10000 products, 500 orders/day):

  • 4 GB RAM
  • 4 CPU cores
  • 40 GB NVMe SSD

For large stores (100000+ products, 2000+ orders/day):

  • 8+ GB RAM
  • 6+ CPU cores
  • 80+ GB NVMe SSD

NVMe drives are critical for PrestaShop. The store database is actively read and written with each order. Regular SSDs provide 500 MB/s, NVMe—3000+ MB/s. The difference is noticeable under high loads.

Additional Tools:

  • Git for version control
  • Composer for PHP dependencies
  • Node.js and npm for frontend development (optional)
  • Redis or Memcached for caching (critical for performance)

Preparing THE.Hosting VPS for PrestaShop

THE.Hosting VPS is ideal for PrestaShop stores. NVMe drives provide database speed, IPv4 address is included (needed for SSL), European datacenters ensure low latency for customers from CIS countries.

Choosing Configuration

For a starting store (up to 500 products, first sales):

  • 2 vCPU
  • 4 GB RAM
  • 40 GB NVMe
  • 1 IPv4

Cost around $7-10/month. Sufficient for the first months. When sales pick up—upgrade to 4 GB RAM with one click in the control panel.

For growing business (1000-5000 products, stable sales):

  • 4 vCPU
  • 8 GB RAM
  • 80 GB NVMe
  • 1 IPv4

Such configuration will handle 500-1000 orders per day without problems. Vertical scaling (more resources to one server) or horizontal (multiple servers behind load balancer).

Initial Server Setup

After ordering VPS, you receive root access via SSH. IP address and password arrive by email. Connect:

ssh root@your-IP-address

First update the system:

apt update && apt upgrade -y

Ubuntu will install the latest security patches and package updates. The process takes 5-10 minutes depending on the number of updates.

Create a separate user (working under root is unsafe):

adduser prestashop
usermod -aG sudo prestashop

The system will ask for a password interactively. Use a strong one—the server is accessible from the internet, brute force attacks are common.

Set up basic firewall:

ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Allow SSH (port 22), HTTP (80), and HTTPS (443). Everything else is blocked. We'll install Fail2ban for brute force protection later.

Configure timezone (important for correct order processing):

timedatectl set-timezone Europe/Moscow

Replace Europe/Moscow with your timezone. List of available zones: timedatectl list-timezones.

Installing LEMP Stack for PrestaShop

LEMP—Linux, Nginx, MySQL (MariaDB), PHP. Classic stack for PHP applications. We build from scratch for full control over configuration.

Installing Nginx

apt install nginx -y
systemctl start nginx
systemctl enable nginx

Check that Nginx started:

systemctl status nginx

Open browser, enter your VPS IP. You'll see the standard Nginx page "Welcome to nginx!"—the web server is working.

Installing MariaDB

apt install mariadb-server mariadb-client -y
systemctl start mariadb
systemctl enable mariadb

Run the initial security setup script:

mysql_secure_installation

The script will ask questions:

  • Enter current password for root: press Enter (no password yet)
  • Switch to unix_socket authentication: n (no)
  • Change the root password: y (yes), enter a strong password
  • Remove anonymous users: y (yes)
  • Disallow root login remotely: y (yes)
  • Remove test database: y (yes)
  • Reload privilege tables: y (yes)

Create database for PrestaShop:

mysql -u root -p

In MySQL console:

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

Replace strong_password_here with a real password. Save the credentials—you'll need them when installing PrestaShop.

Installing PHP 8.3 and Extensions

Ubuntu 24.04 ships with PHP 8.3 in repositories:

apt install php8.3-fpm php8.3-mysql php8.3-curl php8.3-gd php8.3-intl \
php8.3-mbstring php8.3-xml php8.3-zip php8.3-bcmath php8.3-soap \
php8.3-readline php8.3-opcache -y

Check PHP version:

php -v

Should show PHP 8.3.x.

Configure PHP for PrestaShop. Edit /etc/php/8.3/fpm/php.ini:

nano /etc/php/8.3/fpm/php.ini

Find and change parameters:

memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_vars = 10000
date.timezone = Europe/Moscow

These values are optimal for PrestaShop. memory_limit 512M is needed for importing large product catalogs. max_input_vars 10000 is critical—without it, PrestaShop admin panel won't save changes on large pages.

Restart PHP-FPM:

systemctl restart php8.3-fpm

Configuring Nginx for PrestaShop

Create virtual host configuration. File /etc/nginx/sites-available/prestashop:

nano /etc/nginx/sites-available/prestashop

Insert configuration:

server {
    listen 80;
    server_name your-domain.com www.your-domain.com;

    root /var/www/prestashop;
    index index.php;

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

    # Protection from access to sensitive files
    location ~ /\. {
        deny all;
    }

    location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|travis-scripts|vendor|var)/ {
        deny all;
    }

    # PrestaShop rewrite rules
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # PHP processing
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;

        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 16k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
    }

    # Static caching
    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|woff|woff2|ttf|svg|eot)$ {
        expires 30d;
        add_header Cache-Control "public, immutable";
    }

    # Gzip compression
    gzip on;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_types text/plain text/css text/xml text/jаvascript application/json application/jаvascript application/xml+rss application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
}

Replace your-domain.com with your actual domain. If you don't have a domain yet, use the server IP address.

Activate configuration:

ln -s /etc/nginx/sites-available/prestashop /etc/nginx/sites-enabled/
rm /etc/nginx/sites-enabled/default
nginx -t
systemctl reload nginx

Command nginx -t checks syntax. No errors—reload Nginx.

Installing PrestaShop 9

Download the latest PrestaShop version from the official website. Create directory for the store:

mkdir -p /var/www/prestashop
cd /var/www/prestashop

Download PrestaShop:

wget https://github.com/PrestaShop/PrestaShop/releases/download/9.0.0/prestashop_9.0.0.zip

If the link doesn't work (version updated), check the current release on GitHub: https://github.com/PrestaShop/PrestaShop/releases

Install unzip if not present:

apt install unzip -y

Extract archive:

unzip prestashop_9.0.0.zip
rm prestashop_9.0.0.zip

PrestaShop will extract to the current directory. Inside will be the installation file and folder structure.

Set correct permissions:

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

User www-data is the user under which Nginx and PHP-FPM operate. Without proper permissions, PrestaShop won't be able to write files (cache, uploaded images, modules).

Running Web Installer

Open browser and go to http://your-domain.com (or http://your-IP). PrestaShop installer will load.

Step 1: Language Selection

Installer will offer language selection. Choose English for an English-speaking audience. The installer language doesn't affect store languages—you'll configure those later.

Step 2: License

PrestaShop uses the Open Software License (OSL). Read and accept the terms. Without this, installation won't continue.

Step 3: Compatibility Check

Installer will check that the server meets requirements:

  • PHP version 8.1+
  • Required PHP extensions installed
  • Write permissions on directories

If something is red—there's a problem. Green checkmarks—everything is good. With proper LEMP stack setup, all checks will pass.

Step 4: Store Information

Fill in basic dаta:

  • Shop name: your store name
  • Main activity: select category from list
  • Country: country where business is located
  • First name: your first name
  • Last name: last name
  • Email: admin email (for login)
  • Password: strong password for admin panel

PrestaShop requires password minimum 8 characters, with mixed case letters, numbers, and special characters. Don't use simple passwords—admin panel is accessible from the internet.

Step 5: Database Configuration

Enter the credentials of the previously created database:

  • Database server address: localhost
  • Database name: prestashop
  • Database login: prestashop_user
  • Database password: password you set when creating user

Click "Test your database connection now!". If data is correct—green checkmark appears. If error—check credentials, ensure MariaDB is running (systemctl status mariadb).

Option "Drop existing tables": leave disabled if database is empty. Enable only when reinstalling PrestaShop in the same database.

Tables prefix: default ps_. Can leave or change to unique. Prefix is added to all tables in database (ps_product, ps_customer, etc.). Useful if multiple PrestaShop stores in one database (not recommended, but technically possible).

Test data: installer will offer to load demo products, categories, users. Useful for familiarizing with interface. For production store, disable—deleting demo data takes longer than adding your own.

Step 6: Installation Process

PrestaShop will create database structure, copy files, configure settings. Process takes 2-5 minutes. Progress bar shows current stage.

Don't close browser tab during installation. Interrupted installation leaves database in inconsistent state—you'll have to clean and start over.

Step 7: Completion

After successful installation, you'll see a message with two important points:

  1. Delete install folder: critical for security. Command:
    rm -rf /var/www/prestashop/install

Without deleting install folder, anyone can reinstall your store. PrestaShop won't open admin panel until install is deleted.

  1. Rename admin folder: by default admin panel is accessible at /admin. Attackers know this and try to hack. Rename:
    mv /var/www/prestashop/admin /var/www/prestashop/admin_unique_name

Replace unique_name with random string. Examples: admin_x7k2m9, admin_secret, backoffice_shop. Remember the new name—this will be your admin panel address.

After these actions, the store is ready to work. Storefront is available at http://your-domain.com, admin panel—http://your-domain.com/admin_unique_name.

Initial PrestaShop Configuration

After installation, the store works but requires configuration for sales. Go through key admin panel sections.

Basic Store Settings

Section Shop Settings → General.

General settings:

  • Enable SSL if you plan to install it (about this below)
  • Set correct timezone
  • Choose default currency
  • Configure measurement units (weight, distance)

Order settings:

  • Minimum order amount (if needed)
  • Enable guest checkout (purchase without registration)
  • Terms of use (return policy)
  • Order statuses (can leave standard or add your own)

Customer settings:

  • Required fields during registration
  • Can create b2b account (for wholesalers)
  • Privacy policy (required by GDPR)

Language and Localization Setup

Section International → Localization.

PrestaShop initially supports dozens of languages. For a store in Russia, install Russian:

  1. Go to Languages
  2. Click Add language
  3. Choose Russian from list
  4. Import language pack

After installing Russian, entire interface (storefront and admin panel) switches. English can be left for international customers or deleted if not needed.

Currencies:

Add currencies you accept. For Russia, ruble (RUB) is mandatory. If selling to other countries—add dollar (USD), euro (EUR).

Currency rates update manually or automatically. Set up auto-update if using multiple currencies—rates change daily.

Taxes:

Tax setup depends on country. For Russia:

  • Create VAT 20% tax
  • Apply to products where VAT is included
  • Specify whether to show prices with or without VAT

PrestaShop will automatically calculate taxes during checkout.

Payment Method Setup

Section Modules → Module Manager, category Payment modules.

PrestaShop includes basic payment methods:

  • Bank transfer: customer transfers money directly to your account
  • Cash on delivery: payment upon receipt
  • Check: rarely used in Russia

For accepting bank cards, you need third-party modules. Popular for Russia:

YooKassa (Yandex.Checkout):

  • Supports Visa, MasterCard, MIR cards
  • E-wallets (YooMoney, Qiwi)
  • Installment payments
  • Commission 2.8-3.5% of amount

Module is free, downloaded from YooKassa website. Installation: upload zip through PrestaShop admin panel, enter Shop ID and Secret Key from YooKassa personal account.

Robokassa:

  • Alternative to YooKassa
  • Slightly higher commission (3.5-4%)
  • Cryptocurrency support

PayPal:

  • For international sales
  • Commission 3.4% + $0.30 per transaction
  • Works in Russia with restrictions

Payment module installation is standard: download zip, upload through admin panel, configure API keys.

Shipping Setup

Section Shipping → Carriers.

PrestaShop allows configuring multiple shipping methods with different rates.

Courier delivery:

  • Fixed cost
  • Calculation by product weight
  • Calculation by order amount (free shipping from $100)
  • Calculation by region

Pickup:

  • Specify pickup point address
  • Cost $0
  • Customer receives notification when order is ready

Integration with delivery services:

Popular for Russia:

  • CDEK: module for real-time cost and delivery time calculation
  • Boxberry: pickup points across Russia
  • Russian Post: EMS and regular post
  • DPD: for bulky cargo

Modules are paid ($20-50), downloaded from PrestaShop Addons or delivery service websites. Installation is similar to payment modules—upload zip, enter API keys.

Installing SSL Certificate for Security

HTTPS is mandatory for online stores. Browsers show warnings on sites without SSL. Customers won't enter card details on unsecured sites. Search engines lower sites without HTTPS in rankings.

Let's Encrypt provides free SSL certificates with automatic renewal. Install Certbot:

apt install certbot python3-certbot-nginx -y

Get certificate for domain:

certbot --nginx -d your-domain.com -d www.your-domain.com

Certbot will ask questions:

  • Email: for certificate expiration notifications
  • Terms of Service: agree to terms
  • Redirect HTTP to HTTPS: choose 2 (yes, redirect)

Certbot will automatically configure Nginx, get certificate, set up auto-renewal. Process takes a minute.

After SSL installation, edit PrestaShop configuration. File /var/www/prestashop/app/config/parameters.php:

nano /var/www/prestashop/app/config/parameters.php

Find line:

'ps_ssl_enabled' => false,

Change to:

'ps_ssl_enabled' => true,
'ps_ssl_enabled_everywhere' => true,

Save file. Now PrestaShop works only through HTTPS.

Check automatic certificate renewal:

certbot renew --dry-run

If command executes without errors—renewal is configured. Let's Encrypt renews certificates 30 days before expiration automatically through systemd timer.

PrestaShop Performance Optimization

Out of the box, PrestaShop works but slowly. Optimization is critical for conversion—each second of page load reduces sales by 7%.

Enabling Built-in Cache

Section Performance in PrestaShop admin panel.

Smarty (template cache):

  • Set "Recompile templates if files have been updated"
  • Enable Smarty cache
  • Choose "File System" as cache method

CCC (Combine, Compress, Cache):

  • Enable "Combine, compress and cache CSS files"
  • Enable "Combine, compress and cache jаvascript files"

CCC combines dozens of CSS/JS files into one, compresses through gzip, caches in browser. Number of HTTP requests decreases from 50-100 to 5-10.

Image optimization:

  • Enable "Use on-the-fly image compression"
  • Choose WebP format for modern browsers
  • Set JPEG quality (80-85% optimal)

After enabling CCC, definitely clear PrestaShop cache with "Clear cache" button on same page.

Installing Redis for Object Caching

Redis caches database queries in memory. Instead of executing SQL query each time, PrestaShop takes result from Redis. Performance gain 50-300%.

Install Redis:

apt install redis-server php-redis -y
systemctl enable redis-server
systemctl start redis-server

Configure PrestaShop to use Redis. File /var/www/prestashop/app/config/parameters.php:

nano /var/www/prestashop/app/config/parameters.php

Add or change:

'cache_class_prefix' => 'pref_',
'cache_dir' => '/var/www/prestashop/var/cache',
'database_engine' => 'InnoDB',
'ps_cache_enable' => true,
'ps_caching' => 'CacheMemcache',
'ps_cache_default_lifetime' => 3600,
'ps_cache_server' => '127.0.0.1',
'ps_cache_port' => 6379,

Restart PHP-FPM:

systemctl restart php8.3-fpm

Check that Redis is working:

redis-cli ping

Should return "PONG". Now PrestaShop caches data in Redis instead of file system.

Configuring OPcache for PHP

OPcache caches compiled PHP bytecode. Without OPcache, PHP compiles scripts every time. With OPcache, compilation happens once, then cache is used.

OPcache is already installed with PHP, just needs proper configuration. File /etc/php/8.3/fpm/conf.d/10-opcache.ini:

nano /etc/php/8.3/fpm/conf.d/10-opcache.ini

Optimal settings for PrestaShop:

opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.max_wasted_percentage=5
opcache.validate_timestamps=0
opcache.revalidate_freq=0
opcache.save_comments=1
opcache.enable_cli=0

Parameter opcache.validate_timestamps=0 is critical for production. PHP doesn't check file changes, always uses cache. After file updates, clear OPcache manually:

systemctl reload php8.3-fpm

Restart PHP-FPM:

systemctl restart php8.3-fpm

MySQL/MariaDB Optimization

Database is PrestaShop's bottleneck. MySQL/MariaDB optimization provides noticeable gain.

Edit /etc/mysql/mariadb.conf.d/50-server.cnf:

nano /etc/mysql/mariadb.conf.d/50-server.cnf

Add to [mysqld] section:

# InnoDB settings
innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_file_per_table = 1

# Query cache (for MariaDB 10.6+)
query_cache_type = 1
query_cache_size = 128M
query_cache_limit = 2M

# Connections
max_connections = 150
thread_cache_size = 50
table_open_cache = 4000
tmp_table_size = 64M
max_heap_table_size = 64M

Value innodb_buffer_pool_size should be 50-70% of RAM. For VPS with 4 GB RAM set 2G, with 8 GB—4G.

Restart MariaDB:

systemctl restart mariadb

Check that MariaDB started:

systemctl status mariadb

CDN for Static Files

Content Delivery Network serves images, CSS, JS from servers close to visitor. Customer from Vladivostok gets files from Asia server instead of Moscow—loading is faster.

Cloudflare provides free CDN. Register at cloudflare.com, add domain, change NS records at registrar. Cloudflare automatically caches static files.

In PrestaShop, specify CDN URL in section Performance → Media servers. Format: https://cdn.your-domain.com. All image links will use CDN domain.

PrestaShop Store Security

Online stores are frequent attack targets. Customer data, payment information, database access—all attract hackers. Security is critical.

Basic Protection Measures

Updates:

Monitor PrestaShop updates. Vulnerabilities are found regularly, patches come out quickly. Section Modules → Module Manager, tab Updates shows available platform and module updates.

Before updating, definitely make backup. Update process can break incompatible modules or themes.

Strong passwords:

Admin panel, FTP, database, SSH—use unique strong passwords everywhere. Minimum 16 characters, mixed case letters, numbers, special characters. Use password manager (Bitwarden, KeePass).

Two-factor authentication:

Install 2FA module for PrestaShop admin panel. Even if password is stolen, can't log in without code from app. Modules available on PrestaShop Addons, many free.

Admin Panel Protection

Directory renaming:

After installation, renamed /admin to unique name. This is basic protection but effective—automated bots won't find admin panel.

IP access restriction:

If you administer store from constant IP, forbid admin panel access from other addresses. In Nginx configuration for admin directory:

location ~ ^/admin_unique_name {
    allow your.IP.address.here;
    deny all;

    # Rest of configuration...
}

Reload Nginx—admin panel accessible only from your IP. Other addresses get 403 Forbidden.

Login attempt limit:

Modules like "Login Protection" limit number of login attempts. After 5 failed attempts, IP is blocked for 30 minutes. Protects against brute force attacks.

Fail2ban for Server Protection

Fail2ban monitors logs and blocks IP addresses with suspicious activity.

Installation:

apt install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban

Configure Nginx protection. File /etc/fail2ban/jail.local:

nano /etc/fail2ban/jail.local

Insert:

[nginx-http-auth]
enabled = true
port = http,https
logpath = /var/log/nginx/error.log

[nginx-noscript]
enabled = true
port = http,https
logpath = /var/log/nginx/access.log
maxretry = 6
bantime = 3600
findtime = 600

[nginx-badbots]
enabled = true
port = http,https
logpath = /var/log/nginx/access.log
maxretry = 2
bantime = 86400
findtime = 600

Restart Fail2ban:

systemctl restart fail2ban

Check status:

fail2ban-client status

Will show active jails. Fail2ban now protects server from brute force SSH and HTTP attacks.

Regular Backups

Backups are the last line of defense. Store hacked, data deleted, malicious code installed—with backup you'll recover quickly.

What to backup:

  • MySQL database
  • PrestaShop files (/var/www/prestashop)
  • Nginx configurations (/etc/nginx)
  • SSL certificates (/etc/letsencrypt)

Automatic backup script:

#!/bin/bash

BACKUP_DIR="/backups/prestashop"
DATE=$(date +%Y%m%d_%H%M%S)
DB_NAME="prestashop"
DB_USER="prestashop_user"
DB_PASS="your_database_password"

mkdir -p "$BACKUP_DIR"

# Database dump
mysqldump -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" | gzip > "$BACKUP_DIR/db_${DATE}.sql.gz"

# Files archive
tar -czf "$BACKUP_DIR/files_${DATE}.tar.gz" /var/www/prestashop

# Delete old backups (older than 7 days)
find "$BACKUP_DIR" -name "*.gz" -mtime +7 -delete

echo "Backup completed: $DATE"

Save as /usr/local/bin/prestashop_backup.sh, make executable:

chmod +x /usr/local/bin/prestashop_backup.sh

Add to cron for daily execution:

crontab -e

Add line:

0 3 * * * /usr/local/bin/prestashop_backup.sh

Backup will create every night at 3:00. Store backups not only locally—upload to separate server, S3, or other remote storage.

Store Maintenance and Monitoring

PrestaShop requires regular maintenance. Store doesn't work by itself—monitoring, updates, optimization needed.

Performance Monitoring

Uptime Robot or similar services check store availability every 5 minutes. If site goes down—get notification via email/SMS. Free plan allows monitoring 50 sites.

Internal monitoring through Nginx logs:

tail -f /var/log/nginx/prestashop_access.log

Watch response codes. 200—OK, 404—page not found, 500—internal server error. Frequent 500 errors mean problems with PHP or database.

Google Analytics or Matomo for sales analytics. Track:

  • Conversion (percentage of visitors making orders)
  • Average page load time
  • Abandoned carts (added products but didn't buy)
  • Popular products and categories

Updating PrestaShop

PrestaShop releases security updates monthly, major versions once a year or two. Updating is critical for security and performance.

Update process:

  1. Create full backup (database + files)
  2. Update modules through Module Manager
  3. Download update archive from official PrestaShop website
  4. Upload through admin panel section "Advanced Parameters" → "Update"
  5. Run update wizard
  6. Check store after update

Updating major versions (1.7 → 8.0 → 9.0) is risky. Custom themes and modules may break. Test on store copy before updating production.

Minor updates (9.0.0 → 9.0.1) are safe. Usually only security patches and bug fixes, compatibility maintained.

Database Optimization

Over time, PrestaShop database bloats with logs, old records, fragmented tables. Regular optimization speeds up store.

Clear PrestaShop logs:

Section Advanced Parameters → Logs, delete old logs (older than a month). Logs occupy gigabytes and provide no value after analysis.

Optimize MySQL tables:

mysqlcheck -u root -p --optimize --all-databases

Command defragments tables, rebuilds indexes. For large database, process takes 10-30 minutes. Run at night when store is least loaded.

Delete unused dаta:

  • Old product versions (if you keep change history)
  • Old carts (incomplete purchases older than 30 days)
  • Search query logs (analytics for past months)

PrestaShop doesn't delete this automatically. Either manually through database or modules for cleanup (available on Addons).

Scaling PrestaShop for Business Growth

Store grows—more resources needed. Vertical scaling (more power to one server) or horizontal (multiple servers).

Vertical Scaling

On THE.Hosting VPS, you can upgrade resources without reinstallation:

  • 4 GB RAM → 8 GB: button in control panel, server reboots, new resources available
  • 2 vCPU → 4 vCPU: similarly
  • 40 GB NVMe → 80 GB: disk expansion without data loss

Vertical scaling works to a point. One server can't handle infinite load. For large stores (10000+ orders/day), horizontal scaling needed.

Horizontal Scaling

Multiple servers behind load balancer. Structure:

  1. Load Balancer: Nginx accepts requests, distributes among web servers
  2. Web servers (2-5): PrestaShop files, PHP-FPM
  3. Database server: separate VPS only for MySQL/MariaDB
  4. Redis/Memcached server: in-memory cache
  5. NFS/GlusterFS: shared file storage for product images

Such architecture handles tens of thousands of simultaneous visitors. Setup is more complex than one VPS, but necessary for large business.

THE.Hosting VPS allows building such infrastructure. Order multiple VPS, configure private network between them (VLAN), set up load balancing.

Advantages of Hosting PrestaShop on THE.Hosting VPS

Shared hosting isn't suitable for online stores. Resource limitations, slow disks, dozens of neighbors on one server. PrestaShop requires dedicated resources.

THE.Hosting VPS solves these problems:

NVMe drives instead of regular SSD:

PrestaShop actively works with database. Every product view—queries to MySQL. Every order—write to database. NVMe drives provide read/write speed 5-7 times higher than regular SSD. Database works instantly, pages load fast.

Dedicated resources:

2 vCPU and 4 GB RAM only for your store. No neighbors who can load server. Traffic of dozens of customers simultaneously processes without lags.

IPv4 address included:

SSL certificate needs dedicated IP. On shared hosting, this is extra charge. THE.Hosting VPS includes IPv4 free. Installed Let's Encrypt—store works over HTTPS without additional costs.

European datacenters:

THE.Hosting servers located in Europe. For customers from Russia, Ukraine, Kazakhstan, latency is minimal (20-50 ms). Pages load instantly. For SEO this is a plus—Google considers loading speed.

Root access and full control:

Install what you want, configure as needed. No hosting provider restrictions on PHP modules, server configuration, software versions. PrestaShop requires specific settings—on VPS you do everything yourself.

Scalability:

Store grows—upgrade resources in control panel. Need second server for database—order additional VPS, configure replication. On shared hosting, this is impossible.

24/7 technical support:

Server problems solved quickly. Don't wait day or two for hosting provider response. THE.Hosting support responds within an hour, helps with basic setup.

Common Problems and Solutions

PrestaShop Shows White Page

Cause: PHP error, usually out of memory or fatal error in code.

Solution:

  1. Enable debug mode in /var/www/prestashop/config/defines.inc.php:
    define('_PS_MODE_DEV_', true);
  2. Refresh page—you'll see error text
  3. If error "Memory exhausted", increase memory_limit in php.ini
  4. After fixing, disable debug mode (PS_MODE_DEV = false)

Admin Panel Won't Open After Update

Cause: Smarty cache didn't update or module incompatible with new version.

Solution:

rm -rf /var/www/prestashop/var/cache/*
rm -rf /var/www/prestashop/app/cache/*

Clear cache via SSH. If doesn't help—disable modules one by one, look for incompatible one.

Slow Product Loading with Many Images

Cause: images not optimized, cache not configured.

Solution:

  1. Enable WebP format for images
  2. Set up CDN (Cloudflare)
  3. Enable lazy loading for images (modules available on Addons)
  4. Optimize existing images through ImageMagick:
    find /var/www/prestashop/img -name "*.jpg" -exec jpegoptim --max=85 {} \;

504 Gateway Timeout Errors When Importing Products

Cause: PHP doesn't have time to process large CSV file within 300 seconds.

Solution: Increase timeouts in Nginx. File /etc/nginx/sites-available/prestashop:

fastcgi_read_timeout 600;
fastcgi_send_timeout 600;

In php.ini:

max_execution_time = 600

Restart Nginx and PHP-FPM.

Ready to launch online store on PrestaShop?

THE.Hosting VPS with NVMe drives and dedicated resources—optimal platform for PrestaShop. Full root access, IPv4 included, European datacenters.

Order VPS for PrestaShop

Frequently Asked Questions

How much does PrestaShop store maintenance cost?

PrestaShop is free, but hosting, domain, modules are needed. VPS 4 GB RAM costs $7-15/month, domain $3-7/year, payment modules $0-100 one-time, theme $50-300. Total start from $15/month + one-time setup costs.

Can store be moved from other hosting?

Yes, migration is standard. Create database dump, copy files via SFTP, import database on new server, update configuration (URL, paths). Process takes 1-3 hours for medium store.

Programming knowledge needed for PrestaShop?

For basic work, no. Installation, configuration, adding products—all through admin panel. For theme and module customization, PHP, jаvascript, CSS needed. Can hire developer for complex tasks.

Which modules are essential for PrestaShop?

Minimum: payment module (YooKassa, Robokassa), shipping (CDEK, Russian Post), Google Analytics, backup, spam protection. Rest depends on store specifics.

How many products can PrestaShop handle?

On properly configured VPS—tens of thousands of products without problems. Stores with 100000+ products work, but require database optimization, good caching, powerful server (8+ GB RAM).

15% discount on new VPS
Hurry up to order a server in any location
Choose a VPS

Other articles