Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install PrestaShop on Ubuntu

Set up Apache, PHP and MariaDB, download PrestaShop and finish the web installer.

Online Stores2 min read4 steps17 screenshots

Step 1: Update Ubuntu

sudo apt update && sudo apt upgrade -y
Updating the system

Step 2: Install Apache

sudo apt install apache2
Installing Apache

Step 3: Allow .htaccess files

sudo nano /etc/apache2/sites-available/000-default.conf

Inside the VirtualHost, add:

<Directory /var/www/html>
    AllowOverride All
</Directory>
Allowing overrides

Enable mod_rewrite and restart Apache:

sudo a2enmod rewrite
sudo systemctl restart apache2
Restarting Apache

Step 4: Install PHP

sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-dom php-xml
Installing PHP

Add the other extensions that PrestaShop needs:

sudo apt install php-cli php-common php-mbstring php-intl php-zip php-xmlrpc
Installing more PHP extensions
sudo systemctl restart apache2

Step 5: Install MariaDB and create the database

sudo apt install mariadb-server
Installing MariaDB
sudo mysql_secure_installation
Securing MariaDB
sudo mysql -u root -p
Opening the MariaDB shell
CREATE DATABASE prestashop;
CREATE USER 'ps_user'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON prestashop.* TO 'ps_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Creating the database and the user
Flushing the privileges

Use a strong password. Your system is now ready for PrestaShop.

Step 6: Download PrestaShop

Download the latest PrestaShop zip from the PrestaShop website into your web folder, then unzip it. The package may contain a second zip (prestashop.zip) that you must unzip again:

cd /var/www/html
sudo wget https://assets.prestashop3.com/dst/edition/corporate/8.1.7-1.0/prestashop_edition_basic_version_8.1.7-1.0.zip
sudo apt install unzip
sudo unzip prestashop_*.zip
sudo unzip prestashop.zip
sudo chown -R www-data:www-data /var/www/html
Unzipping the PrestaShop archive

(Use the download link of the current version from the PrestaShop site.)

Step 7: Install PrestaShop

Open your domain (or the server address) in a browser.

The PrestaShop installer
  1. Choose the language and read and accept the license agreement.
    The license agreement
  2. Enter the information about your store (name, activity, country, admin name, email and password).
    The information about the store
  3. Enter the database information: server localhost, the database name prestashop, the user ps_user and its password.
    The installation steps
  4. When it finishes, delete the install folder as the installer says, and note the new name of the admin folder. Log in to the back office.
    The PrestaShop dashboard

Key features

  • Scalability and performance.
  • Security. SSL support, password hashing and updates.
  • Customization. Themes, modules and templates.
  • User management and many payment methods.

Quick recap

  • Install Apache, PHP and MariaDB, and create a database.
  • Download and unzip PrestaShop, set the owner.
  • Finish the installer and remove the install folder.