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
Connect to your VPS as root and update packages
apt update && apt upgrade -yInstall Apache and enable required modules
apt install -y apache2 && a2enmod rewrite headers expires && systemctl enable --now apache2Add 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 updateInstall 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.2Install MySQL 8 and secure the instance
apt install -y mysql-server && mysql_secure_installationCreate 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;"Verify installed versions
php8.2 -v && mysql --version && apache2 -v
Step 2 — Download and Install PrestaShop
Unzip the archive
apt install -y unzip && unzip prestashop_8.1.7.zip -d prestashop && cd prestashopUnzip the inner archive if present (PrestaShop sometimes ships a zip inside a zip)
ls *.zip && unzip prestashop.zip -d . 2>/dev/null || trueSet 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 {} \;Create the Apache VirtualHost (replace `shop.example.com` with your domain)
nano /etc/apache2/sites-available/prestashop.conf
Paste:Enable the site and reload Apache
a2ensite prestashop.conf && a2dissite 000-default.conf && systemctl reload apache2Open `http://shop.example.com` in your browser and follow the installation wizar
Open
http://shop.example.comin your browser and follow the installation wizard: language, license, database settings (host:localhost, database:prestashop, user:psuser), store information, admin account.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
Install Certbot with the Apache plugin
apt install -y certbot python3-certbot-apacheObtain the certificate (replace domain and email)
certbot --apache -d shop.example.com --email [email protected] --agree-tos --non-interactiveVerify 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.phpand set_PS_MODE_DEV_totrue. Read the displayed error, fix it, then set it back tofalse. - 403 errors on media or images — permissions are wrong. Fix with
chown -R www-data:www-data /var/www/prestashopthenfind /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/*.phpand clear the cache from the back office. - Friendly URLs returning 404 — mod_rewrite not active — verify
AllowOverride Allis 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.