Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Install PrestaShop 8.1.6 on Ubuntu 24.04

Table of Contents

  • PrestaShop is a popular open-source e-commerce platform built with PHP.
  • It offers a flexible, feature-rich solution to create and manage online stores.

 Update Your System

Start by updating all packages:

apt update && sudo apt upgrade -y

 Install Apache Web Server

 apt install apache2 -y
systemctl enable apache2
systemctl start apache2

To verify it’s running:

 systemctl status apache2

 Install MySQL (or MariaDB)

Install MySQL server:

apt install mysql-server -y

Now log in and create your PrestaShop database and user:

mysql

Inside the MySQL shell, run:

CREATE DATABASE prestashop_db DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'ps_user'@'localhost' IDENTIFIED BY 'Password123!';
GRANT ALL PRIVILEGES ON prestashop_db.* TO 'ps_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

 Install PHP 8.1 and Required Extensions

Ubuntu 24.04 ships with PHP 8.3, but PrestaShop only supports up to PHP 8.1. 

Add the PHP 8.1 PPA:

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

Install PHP 8.1 modules:

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

Set PHP 8.1 as the default:

 update-alternatives --set php /usr/bin/php8.1

Verify the version:

php -v

Download and Extract PrestaShop 8.1.6

Download the latest compiled release, not the source code:

wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.6/prestashop_8.1.6.zip
unzip prestashop_8.1.6.zip

This will create a prestashop.zip file inside. Extract it:

unzip prestashop.zip -d prestashop
mv prestashop /var/www/html/prestashop

Set the right permissions:

chown -R www-data:www-data /var/www/html/prestashop
chmod -R u+rw /var/www/html/prestashop

Configure Apache Virtual Host

Create a new site config:

vim /etc/apache2/sites-available/prestashop.conf

Paste the following:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/prestashop
    ServerName localhost

    <Directory /var/www/html/prestashop/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/prestashop_error.log
    CustomLog ${APACHE_LOG_DIR}/prestashop_access.log combined
</VirtualHost>

Enable the site and rewrite module:

a2ensite prestashop
a2enmod rewrite
systemctl reload apache2

 Install PrestaShop via Browser

Open your browser and navigate to:

http://your-server-ip/

You’ll be guided through:

  • Database configuration:
  • Language selection
  • License agreement
  • System compatibility
  • DB Name: prestashop_db
  • User: ps_user
  • Password: StrongPassword123!

After installation finishes, you’ll see a success screen.

Post Installation Cleanup

Delete the install folder:

sudo rm -rf /var/www/prestashop/install

Conclusion

  • For production, consider enabling HTTPS and firewall rules for added security.
  • You now have a ready-to-use, scalable e-commerce platform for your business.

If you need expert assistance to install PrestaShop on Ubuntu 24.04, our skilled team at Skynats is ready to help. With our reliable Linux server management services, we ensure a smooth installation and optimized server performance for your PrestaShop store. Contact us today for professional support!

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!