Deployment guide

How to Install PrestaShop on a VPS: Full Guide 2025

Deploy on a VPS Cloud →

Tutorial

How to Install PrestaShop on a VPS: Full Guide 2025

Self-hosting8 min read18 steps

PrestaShop is one of the most widely used open-source e-commerce platforms. Hosted on a VPS, it runs in a dedicated environment with guaranteed resources and full configuration freedom — unlike shared hosting, which quickly bottlenecks growing stores. This guide walks you through every step from server setup to a secure, optimized live store, with commands tested on Ubuntu 24.04 LTS.

Contents· Why Run PrestaShop on a VPS Instead of Shared Hosting?1/13
  1. 01Why Run PrestaShop on a VPS Instead of Shared Hosting?
  2. 02What a VPS Unlocks for PrestaShop
  3. 03System Requirements for PrestaShop 8.x
  4. 04Step 1 — Install Apache, PHP 8.2 and MySQL 8 on Ubuntu 24.04
  5. 05Step 2 — Download and Install PrestaShop
  6. 06Configure SSL with Let's Encrypt and Certbot
  7. 07Obtain and Activate an SSL Certificate
  8. 08Optimize php.ini for PrestaShop
  9. 09Configure PrestaShop After Installation
  10. 10Troubleshooting — Common Post-Install Errors
  11. 11Frequent Issues and Fixes
  12. 12Update PrestaShop Safely
  13. 13Deploy PrestaShop from the ServOrbit Marketplace

Why Run PrestaShop on a VPS Instead of Shared Hosting?

Shared hosting splits CPU, RAM and MySQL connections across dozens of customers. PrestaShop issues complex SQL queries (catalog joins, per-group pricing, promotion rules) and loads multiple PHP hooks on every page. On shared hosting these peaks are throttled by quotas — the store slows down or throws 503 errors precisely when traffic spikes (sales, Black Friday). On a VPS you get dedicated resources, root access and the freedom to install the PHP extensions PrestaShop needs, enable Redis for session caching or ElasticSearch for product search. Premium modules (advanced faceted search, CDP, connected ERP) run without friction.

What a VPS Unlocks for PrestaShop

  • Unconstrained PHP 8.2 — choose the exact version required by your modules and upgrade on your own schedule.
  • Redis for session and object caching — cuts response time by 3–5× on high-traffic catalog pages.
  • ElasticSearch / Meilisearch — instant search across catalogs of 10,000+ products, impossible to host on shared plans.
  • Full root access and unrestricted cron — PrestaShop scheduled tasks (orders, stock, exports), bulk CSV imports, ERP sync scripts.
  • Subdomains and multi-store — one PrestaShop installation can manage multiple stores on different domains from a single back office.
  • Independent module licenses — some modules verify the server IP; a VPS with a dedicated IP avoids license conflicts.
  • Automated snapshots and backups — ServOrbit VPS plans include scheduled snapshots: a restore point before every major update.

System Requirements for PrestaShop 8.x

Before running any command, verify your VPS meets the official PrestaShop 8.x requirements (source: devdocs.prestashop-project.org). OS: Ubuntu 24.04 LTS (recommended) or Debian 12. PHP: 8.1 minimum, 8.2 recommended; required extensions: curl, gd, intl, mbstring, zip, xml, mysql, pdo_mysql, bcmath, fileinfo. Database: MySQL 8.0+ or MariaDB 10.6+. RAM: 2 GB minimum for stores under 5,000 products; 4 GB with ElasticSearch or 10,000+ SKUs. Disk: 5 GB minimum for the install + product media (plan 20 GB for an active store). Web server: Apache 2.4+ with mod_rewrite and .htaccess enabled, or Nginx with URL rewriting configured. SSL: HTTPS is mandatory since PrestaShop 1.7.x — a Let's Encrypt certificate is sufficient.

Step 1 — Install Apache, PHP 8.2 and MySQL 8 on Ubuntu 24.04

  1. Connect to your VPS as root and update packages

    apt update && apt upgrade -y

  2. Install Apache and enable required modules

    apt install -y apache2 && a2enmod rewrite headers expires && systemctl enable --now apache2

  3. Add the Ondrej PHP PPA (PHP 8.2 is not in Ubuntu 24.04 default repos)

    apt install -y software-properties-common && add-apt-repository ppa:ondrej/php -y && apt update

  4. Install PHP 8.2 and all extensions required by PrestaShop

    apt install -y php8.2 php8.2-cli php8.2-common php8.2-curl php8.2-gd php8.2-intl php8.2-mbstring php8.2-mysql php8.2-xml php8.2-zip php8.2-bcmath php8.2-fileinfo libapache2-mod-php8.2

  5. Install MySQL 8 and secure the instance

    apt install -y mysql-server && mysql_secure_installation

  6. Create the PrestaShop database and user

    mysql -u root -p -e "CREATE DATABASE prestashop CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'psuser'@'localhost' IDENTIFIED BY 'StrongPassword!'; GRANT ALL PRIVILEGES ON prestashop.* TO 'psuser'@'localhost'; FLUSH PRIVILEGES;"

  7. Verify installed versions

    php8.2 -v && mysql --version && apache2 -v

Step 2 — Download and Install PrestaShop

  1. Navigate to the web directory and download PrestaShop 8.x (check the latest version on github.com/PrestaShop/PrestaShop/releases)

    cd /var/www && wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip

  2. Unzip the archive

    apt install -y unzip && unzip prestashop_8.1.7.zip -d prestashop && cd prestashop

  3. Unzip the inner archive if present (PrestaShop sometimes ships a zip inside a zip)

    ls *.zip && unzip prestashop.zip -d . 2>/dev/null || true

  4. Set correct ownership for Apache

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

  5. Create the Apache VirtualHost (replace `shop.example.com` with your domain)

    nano /etc/apache2/sites-available/prestashop.conf
    Paste:

  6. Enable the site and reload Apache

    a2ensite prestashop.conf && a2dissite 000-default.conf && systemctl reload apache2

  7. Open `http://shop.example.com` in your browser and follow the installation wizar

    Open http://shop.example.com in your browser and follow the installation wizard: language, license, database settings (host: localhost, database: prestashop, user: psuser), store information, admin account.

  8. Once installation is complete, delete the `/install` folder immediately

    rm -rf /var/www/prestashop/install

Configure SSL with Let's Encrypt and Certbot

HTTPS is mandatory for PrestaShop: the back office blocks non-secure connections and modern browsers warn your customers. Install Certbot, obtain the certificate and let it renew automatically.

Obtain and Activate an SSL Certificate

  1. Install Certbot with the Apache plugin

    apt install -y certbot python3-certbot-apache

  2. Obtain the certificate (replace domain and email)

    certbot --apache -d shop.example.com --email [email protected] --agree-tos --non-interactive

  3. Verify automatic renewal

    certbot renew --dry-run
    Certbot adds a systemd timer automatically — no manual cron required.

Optimize php.ini for PrestaShop

PHP's default values are too conservative for a production store. Edit /etc/php/8.2/apache2/php.ini and adjust these key directives:

- memory_limit = 256M (minimum; 512M with heavy modules)
- upload_max_filesize = 32M (for high-resolution product image imports)
- post_max_size = 32M (must be ≥ upload_max_filesize)
- max_execution_time = 300 (essential for large CSV catalog imports)
- max_input_vars = 5000 (PrestaShop generates many form fields in the back office)
- date.timezone = Europe/London (or your timezone)

Reload Apache after editing: systemctl reload apache2.

Configure PrestaShop After Installation

Once logged into the back office (/admin<hash> — the hash is generated randomly at install time, save it), complete these essential settings: disable debug mode (Advanced Parameters › Performance › Debug mode = NO); enable Smarty cache set to 'Recompile templates only when files are updated'; enable Friendly URLs (Shop Parameters › Traffic & SEO › Friendly URL = YES) then regenerate the .htaccess from the same screen; set up caching (PrestaShop 8.x includes a native Redis module — enter 127.0.0.1:6379 if Redis is installed). Essential modules to activate immediately: Security Headers, reCAPTCHA anti-spam, Google Analytics GA4.

Protect the back office at /admin<hash> by adding an IP restriction in Apache. In your VirtualHost, add a <Location /admin<hash>> block with Require ip YOUR.FIXED.IP. With a dynamic IP, add HTTP basic authentication as a second layer: AuthType Basic / AuthName "Restricted" / AuthUserFile /etc/apache2/.htpasswd / Require valid-user. Create the file with htpasswd -c /etc/apache2/.htpasswd adminuser.

Troubleshooting — Common Post-Install Errors

Common situations and their solutions:

Frequent Issues and Fixes

  • White screen on front or back office — temporarily enable debug mode: edit /var/www/prestashop/config/defines.inc.php and set _PS_MODE_DEV_ to true. Read the displayed error, fix it, then set it back to false.
  • 403 errors on media or images — permissions are wrong. Fix with chown -R www-data:www-data /var/www/prestashop then find /var/www/prestashop -type d -exec chmod 755 {} \;.
  • Slow catalog performance — install Redis (apt install -y redis-server) and configure it under Advanced Parameters › Performance › Caching. Also enable Smarty cache.
  • Corrupted override cache after a bad module — delete autoload cache files: rm -f /var/www/prestashop/cache/class_index.php /var/www/prestashop/cache/autoload/*.php and clear the cache from the back office.
  • Friendly URLs returning 404 — mod_rewrite not active — verify AllowOverride All is present in the VirtualHost and the module is enabled: a2enmod rewrite && systemctl reload apache2.

Update PrestaShop Safely

Never update PrestaShop without a prior backup. Recommended procedure: (1) Take a VPS snapshot from the ServOrbit client area. (2) Back up the database: mysqldump -u psuser -p prestashop > /root/backup_prestashop_$(date +%F).sql. (3) Install the official *PrestaShop Autoupgrade* module from the PrestaShop Marketplace. (4) Follow the module wizard — it checks third-party module compatibility before applying the update. (5) Test the front end and back office, especially the checkout flow. On failure, restore the snapshot or the SQL dump.

Deploy PrestaShop from the ServOrbit Marketplace

If you prefer to skip manual configuration, the ServOrbit Marketplace offers a one-click PrestaShop template: the VPS is provisioned with Apache, PHP 8.2, MySQL 8, Redis and PrestaShop pre-installed, SSL certificate configured. Deployment takes under five minutes. You retain full root access and can apply every optimization described in this guide at your own pace.

Your PrestaShop Store Online in 5 Minutes

Deploy PrestaShop on a ServOrbit VPS with PHP 8.2, MySQL 8 and Redis pre-configured. Dedicated resources, automated snapshots, expert support.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.

Message us on WhatsAppopens in a new tab