Skip to content
Follow
CMS Windows

How to Install PrestaShop on Windows WSL

Richard
Written by
Richard
Jun 2, 2021 Updated Jun 19, 2026 8 min read
How to Enable Voice Access on Windows 11 Sign-In
How to Enable Voice Access on Windows 11 Sign-In

You install PrestaShop on Windows by setting up a Linux environment using Windows Subsystem for Linux (WSL) and then installing PrestaShop within that Linux distribution.

PrestaShop is a free, open-source eCommerce platform that helps you build and manage your online store. WSL 2 specifically allows you to run a full Linux distribution like Ubuntu directly within your Windows 10 or Windows 11 operating system.

This setup creates a dedicated development space on your PC, letting you build and test your PrestaShop store locally before going live.

⚡ Quick Answer

Install PrestaShop on Windows WSL by enabling the Windows Subsystem for Linux and Virtual Machine Platform features via PowerShell. Then, install Ubuntu from the Microsoft Store and create a user account. Finally, install PrestaShop within your Ubuntu environment.

Why Install PrestaShop on Windows WSL?

Installing PrestaShop on Windows using WSL lets you build your online store right on your computer with powerful Linux tools, giving you more control and flexibility.

WSL lets you run a full Linux operating system right on your Windows PC. This opens up powerful Linux tools for developing and running your online store. WSL 2 also boosts performance and integrates better with Linux system calls, making it an excellent choice for running Linux on Windows.

What You Need

Make sure your computer can run WSL 2 before starting. You’ll need Windows 10 version 2004 or newer.

Step 1Turn On WSL in Windows

To install PrestaShop on Windows WSL, the first step is to turn on the Windows Subsystem for Linux feature by opening PowerShell as an administrator.

First, you need to enable WSL in Windows. Open the PowerShell terminal as an administrator. Click the Start button and type PowerShell.

Right-click on Windows PowerShell and select “Run as administrator.”

PowerShell running as administrator for WSL installation
powershell administrator

When the window opens, run this command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

You should see a success message like this:

Deployment Image Servicing and Management tool
Version: 10.0.19041.844

Image Version: 10.0.19042.844

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

Step 2Turn On Virtual Machine Platform

WSL 2 needs the Virtual Machine Platform feature turned on to run PrestaShop on Windows, so you’ll need to activate it using a command in PowerShell.

WSL 2 needs the Virtual Machine Platform feature turned on. This is different from Hyper-V. Run this command in the same PowerShell window:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

If you’re using a Windows 10 version earlier than 2004, you’ll need to use this command instead:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart

After running the commands, restart your computer so the changes take effect. If you don’t restart, the next command might not work.

After restarting, open PowerShell as administrator again. Then run this command to set WSL 2 as the default version:

wsl --set-default-version 2

Step 3Install Ubuntu on Windows

With WSL 2 ready, installing Ubuntu from the Windows Store is the next step to get the Linux environment needed for PrestaShop.

Ubuntu 20.04 LTS gives you access to Ubuntu Terminal and command line tools like bash, ssh, git, and apt.

Ubuntu installation on Windows WSL interface
ubuntu windows wls install

Click the “Get” button to install Ubuntu. After installing, you can launch Ubuntu from WSL.

When you first launch Ubuntu, it will ask you to create a user account. This username doesn’t need to match your Windows username.

You’ll see a prompt like this:

Installing, this may take a few minutes.
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: systemuser
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

System information as of Mon Apr 12 17:57:37 CDT 2021

System load: 0.52 Processes: 7
Usage of /home: unknown Users logged in: 0
Memory usage: 26% IPv4 address for eth0: 192.168.1.100
Swap usage: 0%

1 update can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable

If you run into problems, try these troubleshooting commands:

wsl --set-default-version 1
bcdedit /set hypervisorlaunchtype auto start

Step 4Install Apache Web Server

PrestaShop needs a web server to function, so you’ll install Apache on Ubuntu using a simple command to serve your online store files.

Apache is the most popular web server on the internet – think of it as the software that delivers websites to browsers. PrestaShop needs it to work. Run these commands to install Apache on Ubuntu:

sudo apt update
sudo apt install apache2

After installing, you can use these commands to control Apache:

sudo service apache2 stop
sudo service apache2 start
sudo service apache2 restart

To check that Apache is working, open your web browser and go to:

http://localhost

You should see an Apache test page.

LAMP stack setup on Windows WSL with Ubuntu
lamp windows wsl ubuntu

Step 5Install MariaDB Database Server

Your PrestaShop store needs a database to store all its information safely, so installing MariaDB, a popular database server, on Ubuntu is the next step.

PrestaShop needs a database to store all your store information. MariaDB is a free, open-source database server, which is a system for storing and managing data, and it works great for this. Install it with this command:

sudo apt-get install mariadb-server mariadb-client

After installing, you can control MariaDB with these commands:

sudo service mysql stop
sudo service mysql start
sudo service mysql restart

Next, secure your database with a root password by running this command:

sudo mysql_secure_installation

Answer the questions as shown below:

Enter current password for root (enter for none): Press Enter
Set root password? [Y/n]: Type Y
New password: Enter a password
Re-enter new password: Repeat the password
Remove anonymous users? [Y/n]: Type Y
Disallow root login remotely? [Y/n]: Type Y
Remove test database and access to it? [Y/n]: Type Y
Reload privilege tables now? [Y/n]: Type Y

To verify MariaDB is working, log in to the database with this command:

sudo mysql -u root -p

Enter your root password when asked. You should see a screen like this:

Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 46
Server version: 10.3.29-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]>

Step 6Install PHP and Modules

PHP is the programming language that makes PrestaShop work, so you need to install it along with the specific modules it requires on your Ubuntu system.

PHP is the programming language that makes PrestaShop work. Install PHP and the modules it needs:

sudo apt install php libapache2-mod-php php-imagick php-imap php-json php-ldap php-common php-pgsql php-ssh2 php-sqlite3 php-xml php-mysql php-gmp php-curl php-intl php7.4-mbstring php-xmlrpc php-gd php-xml php-cli php-zip

To check that PHP is installed, run this command:

php -v

You should see something like this:

PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

To test PHP more thoroughly, create a test file. Run this command:

sudo nano /var/www/html/phpinfo.php

Type this content into the file:

<?php phpinfo( ); ?>

Save the file. Restart Apache and then open your browser to:

http://example.com/phpinfo.php

You’ll see the PHP information page.

Testing PHP on Windows WSL with LAMP setup
lamp windows wsl php test

Step 7Create a PrestaShop Database

To get PrestaShop working, you must create a specific database within MariaDB and set up a user account to access it.

Now you need to create a database for PrestaShop to use. Log into MariaDB:

sudo mysql -u root -p

Create a database called prestashop:

CREATE DATABASE prestashop;

Create a database user:

CREATE USER 'prestashopuser'@'localhost' IDENTIFIED BY 'new_password_here';

Give that user full access to the PrestaShop database:

GRANT ALL ON prestashop.* TO 'prestashopuser'@'localhost' WITH GRANT OPTION;

Save your changes and exit:

FLUSH PRIVILEGES;
EXIT;

Step 8Download PrestaShop

Now it’s time to download the latest version of PrestaShop, getting the necessary files ready to be placed on your server.

Download the latest version of PrestaShop. Check the PrestaShop download page to see what the newest version is.

wget https://assets.prestashop2.com/en/system/files/ps_releases/prestashop_1.7.7.4.zip -P /tmp
unzip prestashop_1.7.7.4.zip
sudo unzip /tmp/prestashop.zip -d /var/www/prestashop

Set the correct permissions so PrestaShop can work properly:

sudo chown -R www-data:www-data /var/www/prestashop/
sudo chmod -R 755 /var/www/prestashop/

Step 9Set Up the PrestaShop Site Configuration

You need to tell Apache how to display your PrestaShop website by creating a specific configuration file for it in Apache’s settings.

Create a configuration file for Apache so it knows how to display PrestaShop:

sudo nano /etc/apache2/sites-available/prestashop.conf

Copy and paste this content into the file. Replace “example.com” with your own domain name:

<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/prestashop
ServerName example.com
ServerAlias www.example.com

<Directory /var/www/prestashop/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save the file. Now enable the site by running these commands:

sudo a2ensite prestashop.conf
sudo a2enmod rewrite

Restart Apache to apply the changes:

sudo service apache2 restart

Step 10Complete the PrestaShop Setup

Finally, open your web browser and go to your site’s address to run the PrestaShop installation wizard and finish setting up your online store.

http://example.com

The PrestaShop installation wizard will appear. Follow the steps to set up your store.

PrestaShop installation on Windows WSL with Apache
prestashop windows wsl ubuntu apache

Enter your store information and create an admin account:

Apache configuration for PrestaShop on Windows WSL
prestashop windows wsl apache

Enter your database information:

Database connection setup for PrestaShop on WSL
prestashop windows wsl database connection

After completing the setup, your store will be ready to use. Log in with the admin account you created and start building your online store!

PrestaShop dashboard view on Windows WSL
prestashop windows wsl dashboard

Summary

This guide walked you through how to install PrestaShop on Windows using WSL, covering all the steps from setting up Ubuntu to getting your store online.

  • Enabled WSL and Virtual Machine Platform in Windows
  • Installed Ubuntu 20.04 on your Windows computer
  • Installed Apache web server to serve your store
  • Installed MariaDB database to store your store data
  • Installed PHP and required modules to run PrestaShop
  • Created a database and user for PrestaShop
  • Downloaded and installed PrestaShop
  • Configured Apache to display your PrestaShop store
  • Completed the PrestaShop installation wizard

Your PrestaShop online store is now ready to use on your Windows computer!

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Access Linux Files on Windows 11 Using WSL
Windows How to Access Linux Files on Windows 11 Using WSL
How to Enable or Disable Virtual Machine Platform in Windows 11
Windows How to Enable or Disable Virtual Machine Platform in Windows 11
How to Change Default Distro in Windows Subsystem for Linux
Windows How to Change Default Distro in Windows Subsystem for Linux
How to Update WSL Kernel on Windows 11
Ubuntu Linux How to Update WSL Kernel on Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *