PrestaShop is an open-source e-commerce platform offering a good balance between feature depth and resource requirements — lighter than Magento while more purpose-built for e-commerce than a general CMS with a shopping plugin.
Prerequisites
- Ubuntu 22.04/24.04 VPS: 2 vCPU, 4 GB RAM minimum
- Nginx or Apache, PHP 8.1+, MySQL/MariaDB
Step 1 — Install Required PHP Extensions
sudo apt install php8.2-gd php8.2-curl php8.2-intl php8.2-mbstring php8.2-xml php8.2-zip php8.2-mysql -y
Step 2 — Create the Database
sudo mysql
CREATE DATABASE prestashop;
CREATE USER 'prestashop'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop'@'localhost';
FLUSH PRIVILEGES;
Step 3 — Download PrestaShop
cd /var/www
sudo wget https://download.prestashop.com/download/releases/prestashop_VERSION.zip
sudo unzip prestashop_VERSION.zip -d prestashop
sudo chown -R www-data:www-data prestashop
Check PrestaShop's official site for the current stable version.
Step 4 — Configure Nginx
server {
listen 80;
server_name yourdomain.com;
root /var/www/prestashop;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
}
sudo ln -s /etc/nginx/sites-available/prestashop /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
Step 5 — Run the Web Installer
http://yourdomain.com
Follow the installation wizard: language, store information, and database configuration matching Step 2.
Step 6 — Remove the Install Directory (Required for Security)
sudo rm -rf /var/www/prestashop/install
PrestaShop won't run correctly until this directory is removed after installation completes — also an important security step, since a leftover installer is a common attack vector.
Step 7 — Rename the Admin Directory
The installer typically renames the default admin folder to something unique automatically — note this custom URL, since it's your only way to access the admin panel going forward.
Step 8 — Add HTTPS
sudo certbot --nginx -d yourdomain.com
Step 9 — Configure Payment Modules
Under the admin panel's Modules section, install and configure your chosen payment gateway modules.
Step 10 — Set Up Caching
Enable PrestaShop's built-in cache settings, and consider Redis for session storage on higher-traffic stores — see How to Configure Redis Caching for WooCommerce/Magento for the general pattern, adaptable to PrestaShop's configuration.
Common Errors
Site shows a blank page after install — check PHP error logs; often caused by a missing PHP extension or insufficient memory_limit in php.ini.
"install directory still exists" warning persists — verify the directory was actually deleted, not just renamed, and that file permissions allowed the deletion to succeed.
Continue Reading
- Choosing Between WooCommerce, Magento, PrestaShop, and OpenCart
- E-commerce Security Checklist: Protecting Customer Data on a VPS
- How to Install Let's Encrypt SSL with Certbot (Nginx & Apache)
Browse more articles in E-commerce Platform Deployment.