Installing Magento Open Source on Windows 11

This tutorial will guide you through the steps to install Magento Open Source on your Windows 11 system using Composer.

Prerequisites

Before we start, make sure that you have the following software installed on your system:

Download Magento Open Source

  1. Go to the official GitHub repository for Magento Open Source at https://github.com/magento/magento2.
  2. Click on the "Code" button and select "Download ZIP".
  3. Extract the ZIP file to your preferred location on your local machine.

Install Composer Dependencies

  1. Open a command prompt and navigate to the extracted Magento directory.

  2. Run the following command to install the Magento-specific PHP dependencies:

    composer install -vvv

    This may take some time depending on your internet connection and system performance.

Configure the Database

  1. Open your XAMPP or preferred web server software and create a new MySQL database for Magento.

  2. Navigate to the app/etc/env.php file in the Magento directory and configure the database connection by replacing the following fields with your database connection details:

    'host' => '<database_host>',
    'dbname' => '<database_name>',
    'username' => '<database_username>',
    'password' => '<database_password>',
    

Configure Magento

  1. In the Magento directory, navigate to the pub/ folder and copy the index.php.sample file.

  2. Paste the copied file and rename it to index.php.

  3. Open the index.php file in a text editor and navigate to line 11, and replace the following line:

    $params[Bootstrap::initParamFile] = __DIR__ . '/bootstrap.php';
    

    with

    $params[Bootstrap::initParamFile] = __DIR__ . '/app/bootstrap.php';
    
  4. Save and close the index.php file.

Start the Web Server

  1. Open XAMPP or your preferred web server software and start the Apache and MySQL servers.

  2. Navigate to the Magento directory and run the following command to start the Magento CLI:

    php bin/magento setup:install --base-url=<your_base_url> --backend-frontname=<your_backend_name> --db-host=<database_host> --db-name=<database_name> --db-user=<database_user> --db-password=<database_password>

    Replace the fields with your web server URL and database connection details.

  3. Once the installation is complete, navigate to your web server URL to start working with Magento.

Congratulations! You have installed Magento Open Source on your Windows 11 system.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!