Windows requirements

Using WSL

1. Install WSL

To install WSL2 on Windows follow this guide.
For step #6 Install your Linux distribution of choice we recommend choosing the latest Ubuntu release, as it has the best compatibility on Windows.

1.1 Install Windows Terminal (Optional)

On Windows with WSL, it is recommended to use Windows Terminal. By using it you can open different shells and access different WSL distros in the same place, which is quite handy.

1.2 Install Visual Studio Code (Optional)

VSCode has excellent integration with WSL, so you can run commands, edit code and debug it inside a single editor. Developing in WSL.

2. Install Docker Desktop for Windows

Download and install Docker Desktop for Windows.

3. Enable WSL 2 integration in Docker Desktop settings

Go to Docker Desktop settings > General and make sure that Use the WSL 2 based engine checkbox is checked.
Then, go to Resources >WSL Integration and enable WSL integration into your distro.
Toggle your distro and click Apply & Restart.

4. Install platform-specific dependencies:

Since magento-scripts 1.4.0 CMA will also check installed dependencies before starting the application, and if they are missing will provide instructions on how to install them!
Full list of dependencies for each Linux distro available here.
Ubuntu
1
apt-get install \
2
libcurl4-openssl-dev \
3
libonig-dev \
4
libjpeg-dev \
5
libjpeg8-dev \
6
libjpeg-turbo8-dev \
7
libpng-dev \
8
libicu-dev \
9
libfreetype6-dev \
10
libzip-dev \
11
libssl-dev \
12
build-essential \
13
libbz2-dev \
14
libreadline-dev \
15
libsqlite3-dev \
16
libssl-dev \
17
libxml2-dev \
18
libxslt1-dev \
19
libonig-dev \
20
php-cli \
21
php-bz2 \
22
pkg-config \
23
autoconf \
24
libsodium-dev
Copied!

5. Install PHPBrew

Since [email protected] this part will be done automatically.
To install PHPBrew on Linux you will need to follow installation instructions or use the commands below:
1
# Download PHPBrew
2
curl -L -O https://github.com/phpbrew/phpbrew/releases/latest/download/phpbrew.phar
3
4
# Make it executable
5
chmod +x phpbrew.phar
6
7
# Move PHPBrew binary to system folder.
8
sudo mv phpbrew.phar /usr/local/bin/phpbrew
9
10
# Initialize PHPBrew
11
phpbrew init
Copied!

6. Prepare the environment

To work with Magento you need access keys to access the Magento repository.
  1. 2.
    Generate Access Keypair
Now you have a public key and private key values.
To use them you have 2 options:
  1. 1.
    Use COMPOSER_AUTH environmental variable
    This option is used as a global variable on your machine.
    Replace <public key> and <private key> with your public and private key.
    1
    export COMPOSER_AUTH='{
    2
    "http-basic":{
    3
    "repo.magento.com": {
    4
    "username": "<public key>",
    5
    "password": "<private key>"
    6
    }
    7
    }
    8
    }'
    Copied!
    Add the result to your .bashrc or .zshrc and reload your terminal.
  2. 2.
    Use auth.json file
    This option is used on a per-project basis, so your credentials will be always correct no matter which project you are working on.
    Create auth.json file in the root of your project and inside put the following content using the same <public key> and <private key> you obtained before:
    1
    {
    2
    "http-basic":{
    3
    "repo.magento.com": {
    4
    "username": "<public key>",
    5
    "password": "<private key>"
    6
    }
    7
    }
    8
    }
    Copied!

7. Start your application

Start command description can be found here.

Using VM

As an option, you can run CMA on Windows using a Linux VM running in Virtual Box (free) or VMWare Workstation Player (paid). We recommend using Ubuntu or Manjaro distros, although Linux Mint, CentOS and Fedora are also supported. Installation guide for this option is the same as installing on a regular Linux platform.
Last modified 1mo ago