How to Install PrestaShop on Ubuntu
PrestaShop is a free, open-source e-commerce platform written in PHP. Known for its intuitive back office and multilingual support, PrestaShop powers over 300,000 online stores worldwide. It offers a rich set of built-in features including inventory management, SEO tools, and analytics. This guide covers installing PrestaShop on your Breeze instance running Ubuntu.
Prerequisites
- A Breeze instance with Ubuntu 22.04 or later
- Apache or Nginx web server installed
- PHP 8.1+ with required extensions
- MySQL 5.7+ or MariaDB 10.4+
- At least 2 GB RAM
Step 1 — Install Required PHP Extensions
sudo apt update
sudo apt install -y php-curl php-gd php-intl php-json php-mbstring php-xml \
php-zip php-mysql php-bcmath php-opcache
Adjust PHP settings for PrestaShop by editing /etc/php/8.2/apache2/php.ini:
memory_limit = 256M
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 300
Step 2 — Create the Database
sudo mysql -u root -p
CREATE DATABASE prestashop_db;
CREATE USER 'presta_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON prestashop_db.* TO 'presta_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 3 — Download and Extract PrestaShop
cd /tmp
wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.0/prestashop_8.1.0.zip
sudo mkdir -p /var/www/prestashop
sudo unzip prestashop_8.1.0.zip -d /var/www/prestashop
cd /var/www/prestashop
sudo unzip prestashop.zip
sudo chown -R www-data:www-data /var/www/prestashop
sudo chmod -R 755 /var/www/prestashop
Step 4 — Configure Apache
sudo nano /etc/apache2/sites-available/prestashop.conf
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/prestashop
<Directory /var/www/prestashop>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/prestashop_error.log
CustomLog ${APACHE_LOG_DIR}/prestashop_access.log combined
</VirtualHost>
sudo a2ensite prestashop.conf
sudo a2enmod rewrite
sudo systemctl reload apache2
Step 5 — Run the Installer
Open your browser and navigate to http://yourdomain.com/install. The PrestaShop installer will guide you through language selection, license acceptance, system compatibility checks, store configuration, and database setup. Enter the database credentials you created in Step 2.
Step 6 — Post-Installation Cleanup
After installation, remove the install directory and rename the admin folder:
sudo rm -rf /var/www/prestashop/install
sudo mv /var/www/prestashop/admin /var/www/prestashop/admin-secret-name
Renaming the admin folder adds an extra layer of security since the back office URL will not be guessable.
Performance Optimization
- Enable CCC (Combine, Compress, Cache) in Back Office > Performance
- Enable Smarty cache and set it to file-based caching
- Install Redis or Memcached for session and cache storage
- Enable SSL via Certbot and force HTTPS in PrestaShop settings