Skip to content
Follow
CMS Windows

How to Install Joomla CMS with WSL on Windows 11

Richard
Written by
Richard
Jul 23, 2021 Updated Jun 20, 2026 9 min read
How to Customize Focus Alarm Sounds in Windows 11
How to Customize Focus Alarm Sounds in Windows 11

You install Joomla CMS on Windows 11 by leveraging the power of Windows Subsystem for Linux (WSL).

WSL lets you run a Linux environment, complete with its command-line tools and applications, directly on your Windows 11 PC. This means you can set up and manage Joomla without the overhead of a full virtual machine. WSL 2, in particular, provides enhanced performance and compatibility.

This approach simplifies the process, allowing you to host Joomla directly on your Windows machine. You can achieve a functional Joomla installation on Windows 11 by following straightforward steps.

⚡ Quick Answer

Install Joomla on Windows 11 by first enabling WSL via Command Prompt with `wsl –install` and restarting. Then, install a Linux distribution like Ubuntu using `wsl –install -d `. Finally, set up Nginx and MariaDB within your Linux environment to host Joomla.

Install Windows Subsystem for Linux in 🪟 Windows 11

Installing the Windows Subsystem for Linux (WSL) on Windows 11 lets you run Linux tools directly on your PC. You’ll need to open the Command Prompt as an administrator to start the WSL installation process.

Next, right-click the Command Prompt app and choose to Run as administrator.

Opening Windows 11 Command Prompt as administrator to install WSL
windows 11 command prompt administrator

When the console opens, run the commands below to install Windows Subsystem for Linux (WSL):

💻Code
wsl --install

Wait for WSL to be installed.

After installing, you should get a success message similar to the lines below:

💻Code
Installing: Virtual Machine Platform
Virtual Machine Platform has been installed.
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
Downloading: WSL Kernel
Installing: WSL Kernel
WSL Kernel has been installed.
Downloading: GUI App Support
Installing: GUI App Support
GUI App Support has been installed.
Downloading: Ubuntu
The requested operation is successful. Changes will not be effective until the system is rebooted.

Restart your computer.

WSL should be installed and ready to use. When you want to update, run the commands below:

💻Code
wsl --update

Install Specific Linux distro on 🪟 Windows 11

After installing WSL, you can choose and install a specific Linux distribution like Ubuntu or Debian. To see which Linux distros are available for your WSL installation, you can run a simple command in your terminal.

💻Code
wsl --list --online

You should then see all available distributions that can be installed on WSL.

💻Code
NAME            FRIENDLY NAME
Ubuntu          Ubuntu
Debian          Debian GNU/Linux
kali-linux      Kali Linux Rolling
openSUSE-42     openSUSE Leap 42
SLES-12         SUSE Linux Enterprise Server v12
Ubuntu-16.04    Ubuntu 16.04 LTS
Ubuntu-18.04    Ubuntu 18.04 LTS
Ubuntu-20.04    Ubuntu 20.04 LTS

To install a Linux distribution from the list above, simply run the commands below using the distribution name. For example, to install Ubuntu 20.04, run the commands below:

💻Code
wsl --install -d ubuntu-20.04

You should then get a message that the distribution is installed.

💻Code
Downloading: Ubuntu 20.04 LTS
Installing: Ubuntu 20.04 LTS
Ubuntu 20.04 LTS has been installed.
Launching Ubuntu 20.04 LTS.

After installing, you should get a Ubuntu command console with setup details.

💻Code
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: Richard
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 LTS (GNU/Linux 4.4.0-22000-Microsoft x86_64)

Some troubleshooting commands to run when you run into issues.

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

Now that Ubuntu Linux is installed and ready, continue below to install the LEMP server to run Joomla. First, install the Nginx HTTP Server.

Install Nginx HTTP Server

Joomla needs a web server to work, and Nginx is a popular choice that’s fast and reliable. Installing Nginx on your Ubuntu system within WSL is straightforward using the apt package manager.

To install Nginx on Ubuntu, run the commands below:

🐧Bash / Shell
sudo apt update
sudo apt install nginx

After installing Nginx, the commands below can be used to stop and start Nginx services.

🐧Bash / Shell
sudo service nginx stop
sudo service nginx start

To test whether Nginx is installed and functioning, open your web browser and browse to the server’s IP address or hostname.

http://localhost

Installing Nginx web server on Ubuntu via Windows WSL
windows wsl ubuntu nginx install

If you see the above page in your browser, Nginx works as expected.

Install MariaDB Server

Joomla requires a database to store all its content, and MariaDB is a great open-source option that’s fast and secure. You can easily install the MariaDB server and client packages on your Linux distribution using a simple command.

A truly open-source database server that you can use with Joomla is the MariaDB database server. It is fast, secure, and the default server for almost all Linux servers.

To install MariaDB, run the commands below:

🐧Bash / Shell
sudo apt install mariadb-server mariadb-client

After installing MariaDB, the commands below can stop, start, and enable the service to start when the server boots.

🐧Bash / Shell
sudo service mysql stop
sudo service mysql start

Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation.

🐧Bash / Shell
sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

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

To verify and validate that MariaDB is installed and working, log in to the database console using the commands below:

🐧Bash / Shell
sudo mysql -u root -p

Type the root password when prompted.

mariadb welcome
mariadb ubuntu 1604

The server was successfully installed if you see a similar screen.

Since Joomla is built with PHP, you need to install PHP and several specific modules for it to run correctly. Installing PHP and the necessary extensions on your Linux system is done using the apt package manager.

🐧Bash / Shell
sudo apt install php-fpm php-common php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-cli php-zip

After installing PHP, configure some basic settings required for Joomla to function properly.

For this tutorial, PHP 7.4 was installed. Based on your environment, another version of PHP might be installed. So verify that.

🐧Bash / Shell
sudo nano /etc/php/7.4/fpm/php.ini

Below are good settings to configure for most Joomla websites.

💻Code
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

That should get PHP 7.4 installed with some basic settings to allow Joomla to function.

After setting up PHP, the command below can be used to stop and start PHP7.4 services.

🐧Bash / Shell
sudo service php7.4-fpm stop
sudo service php7.4-fpm start

Create Joomla Database

With your web server and database set up, it’s time to create a dedicated database for your Joomla installation. You’ll log into the MariaDB console and then create a new database and a user for Joomla to use.

Login to the MariaDB database console using the commands below:

🐧Bash / Shell
sudo mysql -u root -p

Then, create a database called joomladb

💻Code
CREATE DATABASE joomladb;

Next, create a database user called joomladbuser and set a password

💻Code
CREATE USER 'joomladbuser'@'localhost' IDENTIFIED BY 'new_password_here';

Then, grant the user full access to the database.

💻Code
GRANT ALL ON joomladb.* TO 'joomladbuser'@'localhost' WITH GRANT OPTION;

Finally, save your changes and exit.

💻Code
FLUSH PRIVILEGES;
EXIT;

Create Joomla Database

When all the servers are installed above, it’s time to begin setting up the Joomla environment. First, run the steps below to create a blank database for Joomla.

Login to the MariaDB database console using the commands below:

🐧Bash / Shell
sudo mysql -u root -p

Then, create a database called joomladb

💻Code
CREATE DATABASE joomladb;

Next, create a database user called joomladbuser and set a password

💻Code
CREATE USER 'joomladbuser'@'localhost' IDENTIFIED BY 'new_password_here';

Then, grant the user full access to the database.

💻Code
GRANT ALL ON joomladb.* TO 'joomladbuser'@'localhost' WITH GRANT OPTION;

Finally, save your changes and exit.

💻Code
FLUSH PRIVILEGES;
EXIT;

Download Joomla

Now that your environment is ready, you can download the latest Joomla CMS package. Using the wget command in your Linux terminal is an easy way to download the Joomla files directly to your server.

To view Joomla releases, see this page.

Command Prompt
cd /tmp
wget https://downloads.joomla.org/cms/joomla3/3-9-27/Joomla_3-9-27-Stable-Full_Package.zip
sudo unzip -d /var/www/joomla /tmp/Joomla_3-9-27-Stable-Full_Package.zip

Then, run the command below to allow the www-data user to own the Joomla directory.

🐧Bash / Shell
sudo chown -R www-data:www-data /var/www/joomla/
sudo chmod -R 755 /var/www/joomla/

Configure Nginx VirtualHost

To make your Joomla site accessible through Nginx, you need to set up a VirtualHost configuration file. This file tells Nginx how to handle requests for your specific Joomla website.

Run the commands below to create a new VirtualHost file called Joomla in the /etc/nginx/sites-available/ directory.

🐧Bash / Shell
sudo nano /etc/nginx/sites-available/joomla

Below is a very good configuration setting for most Joomla sites on the Nginx server. This configuration should work great.

Copy the content below and save it into the file created above.

🐘PHP
server {
    listen 80;
    listen [::]:80;
    root /var/www/joomla;
    index  index.php index.html index.htm;
    server_name  example.com www.example.com;

    client_max_body_size 100M;
    autoindex off;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # deny running scripts inside writable directories
    location ~* /(images|cache|media|logs|tmp)/.*.(php|pl|py|jsp|asp|sh|cgi)$ {
      return 403;
      error_page 403 /403_error.html;
    }

    location ~ .php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Save the file and exit.

After saving the file above, run the commands below to enable the new site, then restart the Nginx server.

🐧Bash / Shell
sudo ln -s /etc/nginx/sites-available/joomla /etc/nginx/sites-enabled/
sudo service nginx restart

At this stage, Joomla is ready and can be launched by going to the server’s IP or hostname.

💻Code
http://example.com

That should bring up the Joomla setup wizard. Type in the site name, create an administrator account, and continue.

Joomla CMS installation wizard running on Windows 11 via WSL
joomla windows wsl installation wizard

Type in the database connection and continue

Configuring Joomla database connection settings within Windows WSL environment
joomla windows wls database connection

Finalize the setup and click Install to complete the installation.

Finalizing the Joomla CMS installation process on Windows 11
joomla windows wsl install

Log in with the account above, and you’re done.

Joomla CMS administrative dashboard running locally on Windows 11 WSL
joomla windows wsl dashboard

That’s it!

Conclusion:

This post showed you how to install Joomla on Windows 11 with Ubuntu. If you find any error above, please use the comment form below to report.

You may also like the post below:

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 Update WSL Kernel on Windows 11
Ubuntu Linux How to Update WSL Kernel on Windows 11
How to install Joomla with Nginx support on Ubuntu 24.04
CMS How to install Joomla with Nginx support on Ubuntu 24.04
How to install Joomla with Apache on Ubuntu 24.04
CMS How to install Joomla with Apache on Ubuntu 24.04
How to List Installed WSL Distros on Windows 11
Windows How to List Installed WSL Distros 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 *